none
How can a Windows CE driver handle cleanup after an application crashes? RRS feed

  • Question

  • I have written a driver to handle large pools of contiguous memory for my platform.  While developing an application the utilizes this driver I sometimes experience crashes or hangs.  Once this happens I loss all the memory that i've allocated through this driver.  I'm trying to find a way to handle this in the driver so that when such an event happens it can automatically clean up.  

    After a crash or using Ctrl-C to exit a hang I'm assuming the OS calls close on the driver handle of this application.  Is there a way for the driver to know the handle of the driver that calls Open, Close, DeviceIOControl, etc?   If so I was thinking I could associate that handle with all allocated memory and on close make sure it has all been freed.

    Does anyone have any ideas or suggestions?
    • Moved by Sean LimingMVP Sunday, February 14, 2016 10:30 PM Windows CE question
    Saturday, October 17, 2009 2:33 PM

All replies