SetupDiGetClassDevs, SetupDiEnumDeviceInterfaces , SetupDiGetDeviceInterfaceDetail
+
DeviceIoControl and IOCTL_STORAGE_GET_DEVICE_NUMBER
How to get the Device Instance Path from drive letter using c#
sathish viswanathan
6
Reputation points
I need to get the Device Instance Path from the drive letter in C#. Using WMI is also fine.
2 answers
Sort by: Most helpful
-
Castorix31 83,206 Reputation points
2021-07-06T07:16:45.233+00:00 -
Daniel Zhang-MSFT 9,621 Reputation points
2021-07-06T08:30:44.527+00:00 Hi sathishviswanathan-5522,
David Ching has provided a solution that using a Windows API in this thread, and you can refer to it.
Best Regards,
Daniel Zhang
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.