Error loading a 32bit DLL with 64bit Matlab
Show older comments
I am trying to load a 32bit DLL using loadlibrary() in R2012a 64bit matlab on window 7. I have both the DLL and h files. I have added the DLL and h file locations to the environment path variable and matlab path.
The error I get from loadlibrary() is: dllname.dll is not a valid Win32 application.
While searching for an answere to my problem I have noticed Kaustubha Govind has stated the answer below several times:
- The "is not a valid Win32 application" error usually means that you are attempting to load a 32-bit DLL using 64-bit MATLAB. Perhaps there are no 64-bit versions of the NI DLLs available? You can try installing 32-bit MATLAB on your 64-bit machine and see if you are able to load the libraries from that installation.
I do not have a 64bit version of the DLL available.
Is there any way to load 32bit dll a 64bit matlab?
2 Comments
Image Analyst
on 25 Jun 2012
Good question. I just encountered the same thing today when someone asked me to run (on 64 bit Win7, 64 bit MATLAB) an old app where the author used a custom-written 32 bit DLL. The only solution I gave them was to run 32 bit MATLAB. I might be able to find the source code and perhaps if I could get it to recompile as a 64 bit DLL, it might work. I haven't tried that yet though. Maybe you can try that if you have the source code for the DLL.
Timothy Miller
on 26 Jun 2012
Accepted Answer
More Answers (0)
Categories
Find more on Desktop in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!