LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW application don't closed by shutdown or logout

Hallo,
here one small question.
LabVIEW application running under Windows2000.
Now Ctrl+Alt+Delete pressed, then "Log Off..." choosed.
LabVIEW application closed, but Windows don't logging of and Ctrl+Alt+Del must be pressed again for logging of. The same situation with "Shut Down...".
If two application are running, then only one received AppExit event, and second - not.
How can I avoid this situation?
My goal is following: by Ctrl+Alt+Del->LogOff/ShutDown all LabVIEW application must be closed. Do you have any _simple_ solution?

Thank you.

Some examples in attachment. Just start these application, then try to logging of or shutdown.
0 Kudos
Message 1 of 4
(2,974 Views)
Hmmm, " logging of " means " logging off ", sorry.
0 Kudos
Message 2 of 4
(2,974 Views)
Probably problem, that LabVIEW Run-Time engine returned zero by WM_QUERYENDSESSION, and then the system stops sending WM_QUERYENDSESSION messages...

from Microsoft:

WM_QUERYENDSESSION

The WM_QUERYENDSESSION message is sent when the user chooses to end the session or when an application calls the ExitWindows function. If any application returns zero, the session is not ended. The system stops sending WM_QUERYENDSESSION messages as soon as one application returns zero.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sysinfo/base/wm_queryendsession.asp
0 Kudos
Message 3 of 4
(2,974 Views)
See http://zone.ni.com/devzone/cda/epd/p/id/4394 for windows_messaging_que.zip and use it to listen for WM_POWERBROADCAST, but, note this DOES NOT WORK UNLESS THE LabVIEW APPLICATION IS COMPILED INTO AN EXECUTABLE (.exe)!  When running within the development environment, the message is never caught.  We didn't successfully catch WM_QUERYENDSESSION this way either, but in our case, we did not care, and so did not pursue it further.
 
0 Kudos
Message 4 of 4
(2,613 Views)