04-04-2016 08:27 AM
Hi everyone,
I hope someone could help me.
Well, I have a problem when calling the dll. Every time I launch my program I am geeting this error: 1097
It is the first time I am using a dll in a VI.
I have attached to this message, the dll file and the header .h
Thans in advance,
Feriel
04-06-2016 02:45 AM
Hello,
I have seen in the header file the mention "_stdcall" which refers to a specific calling convention , you can select it in the function tab of the clf block.
Could you confirm me that the dll has been written in C ? ( Or C++ ? )
I suggest you to consult this page if the problem is not resolved by changing the calling convention :
http://forums.ni.com/t5/LabVIEW/Error-Code-1097-Coming-in-DLL-Calling/td-p/1847055
Cordially
Arnaud
GENEBRIER
04-10-2016 11:10 AM
Hello,
I selected stdcall. I am not sur if the dlls were written in C++. How can I know it?
------
I succeded in resolving the problem.
I was getting this error because I didn't respect the calling order of the functions. I started with OpenInstr() while I should have been calling 3 other functions before.
Now I respected the order, I have zero errors.
Thanks for you help,
Regards,
F
04-11-2016 02:07 AM
Hello,
Thank for the feedback.
Could you precise me which calling convention have you used ?
Cordially
04-11-2016 04:22 AM
Well,
In the vi I sent you, I was calling directly CommSetupPort. I had to call ConstructInstrDriver then SelectInstrDriver before. This was written in the SDK manuel of the instrument.
And since the DLLs was using the software privided with the instrument, I had to construct the instrument driver and register before doing any other thing.
PS: ConstructInstrDriver & SelectInstrDriver are two functions allowing to creat the instrument driver in memory and verify registration.
Regards,
F