Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Orderly Shutdown ...
#1
Some of my drivers have state information that they save when the driver shuts down (in FreeCommResource).  This works great if doing a Pause/Resume of the driver, but I noticed that it does not get called if Windows reboots for an update.  I'm not sure what happens if you use the services tool to restart the CQC Application Shell.  Do you have any thoughts on this?  Is there a way to register with windows that you want to be called before a system shutdown for this kind of thing?

I write my state every 20minutes so I don't lose *everything*, but it would be better if I could get called during shutdown.  It is possible that I could update my state more often, but that would require random access to my state file, or possibly an incremental state file supplement which I would have to merge back into the main state when I restart the driver.  


Hmmm.

--Bob
Reply
#2
Your driver's Terminate() method will get called when the driver is shutting down. But, that depends on the app shell service being shut down correctly and being given time to actually shut down. What that happens right, it stops CQCServer and CQCServer starts shutting down all of the drivers. If you are connected, you'll get a free comm resources, then you should get a Terminate() call.

Sometimes Windows is a bit of a Nazi about shutdown times, and will just say, I'm tired of waiting, bye bye. If that happens, and we don't have time to shut down cleanly, there's no much we can do. Post update may be one of those times.
Dean Roddey
Explorans limites defectum
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Startup Error After Unexpected Shutdown khill 15 4,484 09-17-2012, 03:39 PM
Last Post: khill
  Win 7 64bit Reboot / Shutdown hang issue - Master Server batwater 12 3,367 08-13-2011, 12:29 PM
Last Post: batwater
  CQC Service Shutdown and Drivers wuench 1 1,482 10-11-2008, 09:31 AM
Last Post: Dean Roddey
  Shutdown PC from IV ? Rolecgroup 3 1,644 07-01-2007, 02:05 PM
Last Post: Rolecgroup
  Shutdown options jkmonroe 3 1,564 12-21-2006, 05:21 PM
Last Post: Dean Roddey

Forum Jump:


Users browsing this thread: 1 Guest(s)