12-16-2010 07:41 AM
Hi there, I've written a DLL in LabWindows/CVI that I loaded and executed it successfully in TestStand, with the LabWindows/CVI adapter.
The weird thing is that, when the adapter is configured to debug DLL code with an external instance of LabWindows/CVI, the sequence just hangs after the DLL finishs executing its code.
If I turn off external LabWindows/CVI debugging, in the adapter configuration, it doesn't hang but other strange errors occur, even crashing TestStand!
I reviewed my DLL source code and I didn't find anything problematic. Is it possible that the DLL is overwriting a reserved memory region, thus breaking TestStand functionality? Have you ever seen that?
Thank you very much.
12-17-2010 09:40 AM
Yes it's possible that the call is corrupting memory. The most likely way for that to happen is if the prototype specified in TestStand does not match what actually exists in the dll, or if you write more bytes to an array passed in from teststand than the step is specified to be passing from TestStand. Double-check that your prototypes match and that you aren't writing past the end of any buffers or accessing any pointers incorrectly.
Hope this helps,
-Doug