S
skri
Guest
Hi,
I have question regarding the event handling of USB drive. In my driver code i am getting disk device object pointer for USB device and then registering target device change PNP notification on the file object.
IoGetDeviceObjectPointer(DrvName, FILE_READ_ATTRIBUTES, &pFileObj, &pDevObj);
...
IoRegisterPlugPlayNotification(EventCategoryTargetDeviceChange,.., pFileObj,..);
When i do surprise remove the USB drive from the system, i am not getting the GUID_TARGET_DEVICE_REMOVE_COMPLETE event as per this doc Handling a GUID_TARGET_DEVICE_REMOVE_COMPLETE Event - Windows drivers but getting event GUID_IO_MEDIA_ARRIVAL.
Why this strange behavior, is there anything wrong in my PNP registration.?
Thanks,
Poo
Continue reading...
I have question regarding the event handling of USB drive. In my driver code i am getting disk device object pointer for USB device and then registering target device change PNP notification on the file object.
IoGetDeviceObjectPointer(DrvName, FILE_READ_ATTRIBUTES, &pFileObj, &pDevObj);
...
IoRegisterPlugPlayNotification(EventCategoryTargetDeviceChange,.., pFileObj,..);
When i do surprise remove the USB drive from the system, i am not getting the GUID_TARGET_DEVICE_REMOVE_COMPLETE event as per this doc Handling a GUID_TARGET_DEVICE_REMOVE_COMPLETE Event - Windows drivers but getting event GUID_IO_MEDIA_ARRIVAL.
Why this strange behavior, is there anything wrong in my PNP registration.?
Thanks,
Poo
Continue reading...