I am modifying the partition table of an Usb Device for encryption purposes.
The code works fine but i need to unplug and plug the usb device to see changes how can i do this programmatically ?
I know is possible because some other apps do it.Currently i use DeviceIoCtrl to remove the usb device and tell the user to do the operation manually but it’s not professional.
I tried to use IOCTL_INTERNAL_USB_CYCLE_PORT but that is not supported i guess it can be called only from kernel mode.
The Remarks for IOCTL_DISK_UPDATE_PROPERTIES suggest it’s the correct IOCTL to use when you have directly modified the partition table and wish to reload it.