Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
One form application
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00299291
Message ID:
00299829
Views:
19
>You need at least the CLEAR EVENTS so that the QUIT will be respected; the others help deal with possible objects floating around that should be released before shutdown. Dangling object references can prevent the QUIT from working, too.

But these are all done within the TL, so are not required in a SHUTDOWN, they would be redundant...

>>But you've got me thinking about it now - I guess the ideal situation would be to not use the ON SHUTDOWN for anything except QUIT, but to check for unsaved data first, and get rid of that "Cannot Quit vfp" message.
>
>The problem here is that there things outside of the app that can request a shutdown (receipt of a WM_QUIT message, for example) that migth not cooperate and make sure that the world was ready to shut down, or have a user who'll respond in a timely fashion. I have the "pleasure" of having people go home at night and forget to exit from an app or three on their system...can cause real havoc if I've scheduled the system to push out something on an automatic basis that expects to be able to reboot, like some AV updates.

Okay, I guess that's a valid point - it's just that I have no need of this in my environment...critical things like LAN AV updates are enforced by "lecture" and different admins have their own techniques. Eventually LAN Central will come around if anyone is logged on too long. My local method is just doing nightly backups at 2 A.M., and having the backup stop if *anyone* has any server files open. They get a lecture on logging out. If overnight runs are needed, they're always done offline in a secure area.

>>Here's a puzzle for you, though - I put ON SHUTDOWN QUIT in a TL. I run app, leave it open, and try to shutdown/logoff machine. Guess what? Nothing happens, except the app closing. The shutdown/logoff get aborted. Why would that be?
>
>Logoff under Win9x in particular aborts because the ExitWindowEx() call won't by default use the FORCE flag; it sends a message to each open process requesting a shutdown, and if the application doesn't respond within a period of time, the logoff action is aborted. You'll see messages pop at times if Outlook is running and you request a logoff.

This is NT I'm testing on - so, I guess my point is, if it won't shutdown here, how can ON SHUTDOWN help it to close as to your earlier point on critical updates?

Not merely trying to argumentative, I may actually learn something useful out of this discussion :)
The Anonymous Bureaucrat,
and frankly, quite content not to be
a member of either major US political party.
Previous
Reply
Map
View

Click here to load this message in the networking platform