LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Close windows session when exiting my program

I would like to close the current Windows session when exiting my program.
Have you got any solution ???

Thanks
0 Kudos
Message 1 of 6
(3,653 Views)
This sort of thing can be done but you will have to dive into the Windows SDK functions to do it. I doubt that CVI itself has anything in its libraries to support this functionality.
Martin Fredrickson
Test Engineer

Northrop Grumman
Advanced Systems and Products
San Diego, CA 92128
0 Kudos
Message 2 of 6
(3,645 Views)
Along those same lines, try the ExitWindowsEx function from User32.dll.

Link to microsoft:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sysinfo/base/exitwindowsex.asp
Message 3 of 6
(3,641 Views)
I think ExitWindowsEx function does not work in XP.
Thanks.
CVI 2010
LabVIEW 2011 SP1
Vision Builder AI 2011 SP1
0 Kudos
Message 4 of 6
(3,629 Views)
This link from Microsoft says it does work in XP. Review the parameter options to see if any apply to your case.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sysinfo/base/exitwindowsex.asp
Message 5 of 6
(3,626 Views)
ExitWindowsEx works (even with XP...) and it is exactly what I was searching for. Thanks !
0 Kudos
Message 6 of 6
(3,618 Views)