Why not override the power switch? p.s. I hate the new gmail reply system They fell in love with outlook I guess.
On Mon, Apr 1, 2013 at 10:04 AM, Ken Dibble <[email protected]> wrote: > VFP 9 SP 1. > > I know this has been discussed somewhere but can't really find anything > germane. If anyone can refer me to sources that would be great. > > My system has a routine called by ON SHUTDOWN that does many things, like > closing windows (which can force data saves in some cases), logging the > user out, and backing up data. This can take considerable time--several > minutes if the backup runs when the user is the last user to log out. > > A problem sometimes arises if the user shuts down my software and then, > pretty soon thereafter, shuts down the computer. > > As I understand it, there is supposed to be some level of "respect" from > Windows for running applications such that they are allowed to finish > before Windows shuts down. But once in a while, in the course of my ON > SHUTDOWN routine, a procedure that tries to open a table on the network > will encounter VFP Error 1 ("File does not exist.") > > My error log indicates that VFP is searching for this table, which exists > on the server on a mapped drive, in CURDIR(), where it should not be. I am > guessing this is because Windows has killed the mapped drive and VFP's > internal path search has fallen back on CURDIR(). > > My error handler causes a crash at this point because it begins a process > that eventually calls the ON SHUTDOWN routine..again, which means I now > have an error occurring in the context of my error handler, with > predictable ugly results. > > I have long suspected that something like this was happening on occasion > but today for the first time I actually got a user to admit she shut down > Windows while my software was trying to shut itself down, and I got error > log data that describes what happened. > > So.. I could undertake a very lengthy and painful analysis of my shutdown > path and error handler and try to find a better way to detect this > particular condition and handle it gracefully. But before I do that, I'd > like to get as much information as possible about: > > 1. What Windows is *supposed* to do when it is shut down while a program > is still running, > > 2. What Windows *actually does* in that scenario, > > 3. What VFP is *supposed* to do if it is still running when Windows starts > yanking its resources away during an OS shutdown, > > and > > 4. What VFP *actually does* in that scenario. > > Thanks for any help. > > Ken Dibble > www.stic-cil.org > > > ______________________________**_________________ > Post Messages to: [email protected] > Subscription Maintenance: > http://mail.leafe.com/mailman/**listinfo/profox<http://mail.leafe.com/mailman/listinfo/profox> > OT-free version of this list: http://mail.leafe.com/mailman/** > listinfo/profoxtech <http://mail.leafe.com/mailman/listinfo/profoxtech> > Searchable Archive: > http://leafe.com/archives/**search/profox<http://leafe.com/archives/search/profox> > This message: http://leafe.com/archives/**byMID/profox/5.2.1.1.1.** > 20130401105105.01c61500@POP-**Server.stny.rr.com<http://leafe.com/archives/byMID/profox/[email protected]> > ** All postings, unless explicitly stated otherwise, are the opinions of > the author, and do not constitute legal or medical advice. This statement > is added to the messages for those lawyers who are too stupid to see the > obvious. > -- Stephen Russell Sr. Analyst Ring Container Technology Oakland TN 901.246-0159 cell --- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html --- _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/cajidmykkdbkfokajrgodfc+ahp1best92jsxmcdfz6ee2rc...@mail.gmail.com ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

