Unable to load dll using loadlibrary

15 visualizaciones (últimos 30 días)
prashanth
prashanth el 29 de Jun. de 2012
Hi, I am using MATLAB 2012a (64 bit installation) on a 64 bit Windows XP platform. I need to use a 32 bit dll (compiled using MS VC 2010) through MATLAB for controlling several devices. This dll is depends on another 32 bit dll. However the compiled dll has 64 bit dependencies so that it works on the 64 bit Windows platform. I get the following error when I try to use loadlibrary:
Error using loadlibrary (line 419) There was an error loading the library "<PATH>\MATLAB\dllname.dll" PATH\MATLAB\dllname.dll is not a valid Win32 application.
I cannot create a 64 bit dll for my application since the device vendor has provided a 32 bit dll.
I wanted to know if any workaround exists so that I can load the 32 bit dll(with 64 bit dependencies) into MATLAB using loadlibrary.

Respuesta aceptada

Philip Borghesani
Philip Borghesani el 29 de Jun. de 2012
You will need to install 32 bit MATLAB on your machine. That is the only way to use a 32 bit dll.

Más respuestas (1)

prashanth
prashanth el 5 de Jul. de 2012
Thanks. Installed the 32 bit version and it works.

Categorías

Más información sobre Introduction to Installation and Licensing en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by