How do I avoid MATLAB Builder EX problems with 64-bit Windows operating systems?

조회 수: 1 (최근 30일)
When I create a COM DLL from the MATLAB xlmagic demo, I am unable to run the application in Excel successfully.
I create the COM object according the reproduction steps in the MATLAB documentation.

답변 (1개)

Murugavel Sivagnanam
Murugavel Sivagnanam 2011년 1월 11일
The following step should help you to avoid problems with MATLAB Builder EX.
Step 1
When you deploy applications under Windows Vista, Windows 7 or Windows Server 2008 you should turn of User Account Control (UAC) before compiling the application with the deploytool.
To turn off UAC if you have:
- Click Start, and then click Control Panel.
- In Control Panel, click User Accounts.
- In the User Accounts window, click User Accounts.
- In the User Accounts tasks window, click Turn User Account Control on or off.
- If UAC is currently configured in Admin Approval Mode, the User Account Control message appears.
- Click Continue.
- Clear the Use User Account Control (UAC) to help protect your computer - check box, and then click OK.
- Click Restart Now to apply the change right away, or click Restart Later and close the User Accounts tasks window.
Step 2
If you can change UAC on your operating system or registration of the COM component is still not possible, run matlab.exe as administrator.
By right click on the desktop link and push "run as administrator..." or try starting MATLAB from an administrator command prompt (e.g. windows power shell). That should allow the registration to complete by MATLAB commands.
Step 3
Check if MATLAB compiler and Excel application are compatible, because Excel 2007 is 32-bit. You will need Excel 2010 which has a 64-bit version to use a 64-bit MATLAB COM DLL.
Step 4
Install mcrinstaller package and check the system path variable for the correct MATLAB runtime version if you are running your application on a different target system.
Step 5
If you have still problems to run your demo application with Excel you should download Dependency Walker x64 or x32 bit version to debug your Excel application.
This could help you to find out, that you have installed the correct DLL version from MATLAB mcrinstaller package or the right MSVC redistributable package when you are using the Microsoft Visual Studio compiler in the MATLAB configuration environment (mex -setup).

카테고리

Help CenterFile Exchange에서 COM Component Integration에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by