Unable to load dll using loadlibrary

17 ビュー (過去 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 Center および File ExchangeIntroduction 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