MATLAB Answers

Why am I not able to use 32-bit DLL COM Objects in 64-bit MATLAB?

58 views (last 30 days)
I can instantiate a 32-bit COM DLL-file as an In-Process (InProc) ActiveX Server in 32-bit MATLAB:
a = actxserver('MSOSOAP.HttpConnector30')
a =
However, when I attempt the same in 64-bit MATLAB:
b = actxserver('MSOSOAP.HttpConnector30')
I receive the following error:
??? Server Creation Failed: Class not registered

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 15 Jun 2018
The documentation for MATLAB 7.6 (R2008a) has been updated to incorporate the relevant information. This information can be accessed under the section 'Instantiating a DLL component':
For previous product releases, read below for any possible workarounds:
Microsoft does not support loading 32-bit DLLs or In-Process (InProc) COM Servers into a 64-bit application, or vice-versa. For additional information, please refer to the following resource on MSDN:
This limitation does not apply to COM Automation servers that are EXE-files (e.g. Excel, 32-bit MATLAB etc.). These servers will work as expected.


Mr64 on 3 Feb 2016
One might get away with a "system-supplied surrogate":
This would be the according Windows registry hack:
  1. Find the {GUID} of your component in HKLM\SOFTWARE\Classes\<ProgID>\CLSID.
  2. Create the string value "AppId" in HKLM\SOFTWARE\Classes\Wow6432Node\CLSID\{GUID} and set it to {GUID}.
  3. Create the key "{GUID}" in HKLM\SOFTWARE\Classes\Wow6432Node\AppId.
  4. Create the string value "DllSurrogate" in HKLM\SOFTWARE\Classes\Wow6432Node\AppId\{GUID} and leave it empty.
Worked for me on Windows7.
Siraj Issani
Siraj Issani on 4 Sep 2018
The "system-supplied surrogate" hack worked for me as well! Thanks @Mr64!

Sign in to comment.

More Answers (0)

Sign in to answer this question.