Reputation: 11
I have a wpf application that detects the USB removable devices. We have another service(c# and C++) which takes care of the ejection of the drives. This service is being called by the wpf app.
When we are ejecting the volumes(through c++), the volumes are getting unmounted and I see only the drives in the file explorer with no volumes in it which I think is okay. But I need an event to do some operations on the UI when the sd card is removed physically from the card reader.
Wondering is it possible for the windows or .Net to know the physical removal of card even after being ejected programmatically?
I used the WMI queries using Win32_DiskDrive, Win32_LogicalDisk, Win32_DeviceChangeEvent but none of them were able to record it.
Upvotes: 1
Views: 28