LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Program execution when quitting windows

I have an application that runs from the Windows Startup menu so it executes when the user logs in and terminates when the user logs off. This application periodically saves changes the user makes to a database whenever they perform certain actions. However, I want to make sure all the user's changes are saved when they log out of windows.

How can my program detect that the user is logging out and force windows to wait until the program has made it's database updates?

I am using Windows XP Pro and CVI version 8.1

Thank you
0 Kudos
Message 1 of 5
(3,317 Views)

Hi cpoore,

you may find useful reading this thread, especially the last post from ovrabek/CZ which explains how you can refuse to close the system so to let your program terminate all necessary shitdown actions.



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
Message 2 of 5
(3,296 Views)
>>terminate all necessary shitdown actions
 
Typos are a fact of life.  thanks for this one as it made me laugh hard.
0 Kudos
Message 3 of 5
(3,287 Views)
That's scary, I read it without even noticing the typo until you pointed it out ...

I had never been able to get shutdown message detection to work with the message callback either.  Is the sum of this then that if the callback returns a 1, the close event is truly swallowed by the callback?

Menchar
0 Kudos
Message 4 of 5
(3,249 Views)
Thanks for the link. I'm going to go SITdown and try it out.

Chris
0 Kudos
Message 5 of 5
(3,187 Views)