MATLAB: Communication between Matlab and National Instrument card

labviewnational instrument cardni

Hello,
I am trying make a communication between Matlab and my NI-USB6221 card.
Here is my Matlab code :
loadlibrary('nicaiu.dll','nidaqmx.h','alias','myni')
taskh1=uint32(1);
[a,b,taskh1] = calllib('myni','DAQmxCreateTask','master',taskh1)
I precise that the files 'nicaiu.dll' and 'nidaqmx.h' are in the Matlab workspace (so I don't have to use addpath). And I don't have Data Acquisition Toolbox.
And this is what I get :
Warning: Warnings messages were produced while parsing. Check the
functions you
intend to use for correctness. Warning text can be viewed using:
[notfound,warnings]=loadlibrary(...)
> In loadlibrary at 381
??? Error using ==> loadlibrary at 461
There was an error loading the library "C:\Documents and
Settings\uidt1982\Desktop\CARTE_NI\nicaiu.dll"
*La procédure spécifiée est introuvable.*
Caused by: Error using ==> loaddefinedlibrary La procédure spécifiée est introuvable.
For the ones who doesn't speak french at all, the sentence in bold means : "the specified procedure cannot be found"
I don't understand this error and I am really stuck…
Some help would be welcome.

Best Answer

Looks like your header (nidaqmx.h) may be declaring methods that LOADLIBRARY cannot find in the DLL? What do you get in 'warnings' if you try:
>> [notfound,warnings]=loadlibrary('nicaiu.dll','nidaqmx.h','alias','myni')