Closing devices at app termination RRS feed

  • Question

  • Hi,

    We are developing a Windows Store App that is using WinUSB to access/control a device.  The  app sends read/write commands to the device.  At termination of the app, I would like to "clean up" the device by issuing some closing commands so the state of the device is OK on next startup.

    Any suggestions on how I should handle this?

    Many Thanks,



    Thursday, January 30, 2014 9:24 PM


  • Your app doesn't receive any notifications on termination, so you'll need to clean up earlier if your device can't handle being abandoned.

    Cleaning up when the app suspends is a likely time to clean up, and the app can reconnect on resume.

    When is best will depend on the app and the device, on how important is it to clean up nicely, and on how long clean up will take.


    Thursday, January 30, 2014 11:25 PM