Hi everyone,
I am trying to directly call functions in the National Instruments DAQmx driver in a 64-bit setup via loadlibrary. We have everything working under 32-bit, but when switching to 64-bit things break (the setup is 64-bit Matlab 2011b on 64-bit Win7 with the 64-bit driver installed).
When I try to load the 64 bit DAQ dll ('C:\Windows\SysWOW64\nicaiu.dll') using loadlibrary, I receive the error below (both nicaiu.dll and NIDAQmx.h are copied to a local directory.):
>> [A,W] = loadlibrary(['nicaiu.dll'],'NIDAQmx.h','alias','nidaqmx'); Error using loadlibrary (line 421)There was an error loading the library "C:\Users\NSL_User\nicaiu.dll" C:\Users\NSL_User\nicaiu.dll is not a valid Win32 application.Caused by: Error using loaddefinedlibrary C:\Users\NSL_User\nicaiu.dll is not a valid Win32 application.
I have read everything I could find on the web, but am not clear why this doesn't work. I can load the 32-bit library from Matlab, but that leaves me with some type incompatiilities (the libpointer for the task is not recognized when passing it back to the driver).
Insights would be highly appreciated,
Thanks & Best wishes,
Bernhard
Best Answer