A .dll that was working well with Matlab R2018b doesn't work with R2019a version.

7 views (last 30 days)
I'm using .dll file from from AMPI (http://www.ampi.co.il/master8cp.html) to control Master-8 pulse stimulator from Matlab.
It works well with R2018b and R2018a versions, but doesn't work with R2019a (Update 4). Matlab gives the error "Server Creation Failed: A dynamic link library (DLL) initialization routine failed" after command 'Master8=actxserver('AmpiLib.Master8')'.
I still can connect to Master-8 using Matlab R2018b installed on the same computer.
The OS is Windows 10.
How it can be resolved? (I prefer to use most recent version of Matlab)

Answers (1)

Aniket Sachan
Aniket Sachan on 24 Apr 2020
The reason that you are receiving this error could be due to the fact that the DLL needs to be registered manually on the deployment machine using the regsvr32 command from the system command prompt.
For example:
regsvr32 file.dll
You must also register mwcomutil.dll and mwcommgr.dll for each version of MATLAB or MATLAB Compiler Runtime (MCR) you are using.
After registering the components, restart the machine and retry running the batch file.
If you still receive the same error, the issue could be with vcredist(86) not being installed properly.
Run the dependency walker tool on the executable and check if it throws any warning related to ATL80.dll. If it does, then perform the following steps to rectify the issue:
1) Install vcredist from MATLAB Compiler Runtime (MCR) at:
$MCRROOT\$version\bin\win32\vcredist_x86.exe
where $MCRROOT is the installation folder of the MATLAB Compiler Runtime and $version is the MCR version (for example, v74 for MATLAB Compiler 4.4 (R2006a)).
2) Try running regsvr32r again. If it still fails, download the following update from Microsoft:
  2 Comments
monkeyquant
monkeyquant on 13 May 2023
It seems a deployed DLL for Excel which utilizes actxserver in the ML code is not responding on the deployed machines. It works very well in the deploying machine with MATLAB installed. I found one difference that the deployed machines doesn't have Matlab Automation Server Type Libraries in VBA references. I am using MATLAB R2022B and the MCR associated with that version. There is no error simply no response.
I click off the Matlab Automation Server Type Libraries in VBA refence on the deploying machine (ML installed machine) and the same result like the deployed machines.

Sign in to comment.

Categories

Find more on Application Deployment in Help Center and File Exchange

Products


Release

R2019a

Community Treasure Hunt

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

Start Hunting!