WBEM_FLAG_FORWARD_ONLY | WBEM_FLAG_RETURN_IMMEDIATELY, NULL, &pWbemEnum3) On my Windows system this shows up under 'Portable Devices' in 'Device Manager'.ĭevice SWD\WPDBUSENUM_?_USBSTOR#Disk&Ven_Logger&Prod_&Rev_1.00#9&319384a2&0&24842CB953324D5946202020FF170720&0# WHERE AssocClass = Win32_LogicalDiskToPartition') The drive, letter D:// is a UF2, fat filesystem which I am using to flash upgrade an embedded device.
From this how am I able to find which drive letter the USB storage has mounted on? I have written a C++ application which is able to detect multiple USB VID and PID devices upon insertion and removal by matching 'USB\VID_%04X&PID_%04X'.