EvtDeviceSelfManagedIoSuspend. Forced system restart for proper uninstall device.

Hi All!

my driver has declared EvtDeviceSelfManagedIoSuspend callback.
When I try uninstall my device from Device Manager, I expect that system(or pnpmanger) will in first call my EvtDeviceSelfManagedIoSuspend callback,
but instead of that system popup box with info that for proper uninstall I have to restart machine (after machine restart there is no more my device - great, everything is fine).
but I’m hesitating why? and when? system(or pnpmanger) can behave like this to my driver ?

Thanks,
Bob.

On Jun 24, 2016, at 12:17 AM, xxxxx@gmail.com wrote:

my driver has declared EvtDeviceSelfManagedIoSuspend callback.
When I try uninstall my device from Device Manager, I expect that system(or pnpmanger) will in first call my EvtDeviceSelfManagedIoSuspend callback,
but instead of that system popup box with info that for proper uninstall I have to restart machine (after machine restart there is no more my device - great, everything is fine).
but I’m hesitating why? and when? system(or pnpmanger) can behave like this to my driver ?

What kind of device is this, exactly? If some application has an open handle to your device, it cannot be shut down, and that means the only way to uninstall is to reboot.

Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

Yep, I have opened handle on my device form userspace - and that is solution for my issue.
Thanks Tim!!!

> but instead of that system popup box with info that for proper uninstall I have to restart machine

A veto occured during the attempt to stop the devnode. Can be, for instance, an open user mode handle to it.

IIRC Windows writes the PnP vetos to the event logs. Look at them.


Maxim S. Shatskih
Microsoft MVP on File System And Storage
xxxxx@storagecraft.com
http://www.storagecraft.com