Get drive type with SetupDiGetDeviceRegistryProperty

Posted by new on Stack Overflow See other posts from Stack Overflow or by new
Published on 2010-06-07T13:05:57Z Indexed on 2010/06/07 23:42 UTC
Read the original article Hit count: 178

Filed under:
|
|

Dear all,

I would like to know whether i can get the drive information using the

SP_DEVICE_INTERFACE_DETAIL_DATA's DevicePath

my device path looks like below

"\?\usb#vid_04f2&pid_0111#5&39fe81e&0&2#{a5dcbf10-6530-11d2-901f-00c04fb951ed}"

also please tell me in the winapi they say "To determine whether a drive is a USB-type drive, call SetupDiGetDeviceRegistryProperty and specify the SPDRP_REMOVAL_POLICY property."

i too use SetupDiGetDeviceRegistryProperty like below

while ( !SetupDiGetDeviceRegistryProperty( hDevInfo,&DeviceInfoData,
    SPDRP_REMOVAL_POLICY,&DataT,( PBYTE )buffer,buffersize,&buffersize ))

but i dont know how can i get the drive type using the above..

Please help me up

© Stack Overflow or respective owner

Related posts about c++

Related posts about winapi