LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW crashes after VI (calls DLL to post Windows Msg) exits

I built a DLL in Visual C++ and I use LabVIEW 7.1 to call it (using the Call Library function).

When I run the LabVIEW VI without the 'post windows message' functionality in the DLL, it works fine and exits LabVIEW without a problem. If the DLL posts a message, and the code from the link below is used to catch the meassage, the VI appears to have executed and exit correctly, allowing other VIs to be run, etc, but when the VI is closed, LabVIEW stops responding. If it is the only VI open, then it closes leaving the LabVIEW window minimized (and unresponsive) in the Taskbar. Both DLLs successfully detached from LV before the VI stops running.

http://sine.ni.com/apps/we/niepd_web_display.DISPLAY_EPD4?p_guid=B45EACE3E7AC56A4E034080020E74861&p_node=DZ52071&p_submitted=N&p_rank=&p_answer=&p_source=External
0 Kudos
Message 1 of 2
(2,496 Views)
Hi,
can you post your code here so we can try to reproduce it?
It sounds as if the handles aren't being released in the right order. i.e. LabVIEW will hold onto a DLL until the vi using it goes out of memory.
I think from your description you have a DLL which posts a message, and then you're using the example code which was written for LabVIEW 5.0 to read that windows message?
What message are you sending?
When you say the DLL has detached, is that process detach or thread detach?
What version of LabVIEW are you using?
What operating system?
What version of Visual C++?

Thanks
Sacha Emery
National Instruments (UK)
// it takes almost no time to rate an answer Smiley Wink
0 Kudos
Message 2 of 2
(2,428 Views)