Unable to load dll using loadlibrary

조회 수: 27 (최근 30일)
prashanth
prashanth 2012년 6월 29일
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.

채택된 답변

Philip Borghesani
Philip Borghesani 2012년 6월 29일
You will need to install 32 bit MATLAB on your machine. That is the only way to use a 32 bit dll.

추가 답변 (1개)

prashanth
prashanth 2012년 7월 5일
Thanks. Installed the 32 bit version and it works.

카테고리

Help CenterFile Exchange에서 Introduction to Installation and Licensing에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by