05-29-2009 04:22 AM
Hello
I have a VI that contains only a call library function node. This calls a DLL function to open an instrument, which will return if no instrument is found.
When I run it, it behaves as expected and the VI stops running. However, once it has stopped, LabVIEW will throw an exception and exit when I close the VI. Also, the splash screen that is displayed during the function call does not completely disappear; it reamains as an empty window until LabVIEW is closed.
I have tried the same call in C with no problems.
Is there something else that I should be doing to release the DLL, for example?
Thanks
Robin
05-29-2009 04:54 AM
Hi RobinM2,
If you mine can you attached or snapshot of your program so I can figure out your problem.
regards,
Ludz
05-29-2009 05:40 AM
Hi Ludz
Thanks for your reply.
Here is an image.
Robin
05-29-2009 09:42 AM
06-01-2009 03:05 AM
Thanks for the reply.
The Call Library Function node does generate an error. It (correctly) uses stdcall and runs in UI thread. The prototype is
unsigned long (short*)
06-01-2009 08:45 AM
RobinM2 wrote:
It (correctly) uses stdcall and runs in UI thread.
How do you know this is correct? In fact, ...
The prototype is
unsigned long (short*)
This tells me it's C calling convention.
Clearly the argument is supposed to be a pointer to an integer. Are you passing the argument as a pointer?
Why don't you go ahead and post your VI and your DLL source code?
06-04-2009 03:42 AM
I have found that this only happens when using a debug DLL, there are no problems when using a release version. I'm not sure why this is, but it seems unlikely to be a problem on the labview side.
Anyway, thanks for the replies.
06-15-2009 01:31 PM