Prev: ReadDirectoryChangesW
Next: memory allocation fails
From: Uwe Sieber on 8 Jul 2006 13:35 User mode question, just hoping for competent audience here... When I call GetDriveType with a device path like \\?\USBSTOR#DISK&VEN_SANDISK&PROD_U3_CRUZER_MICRO&REV_2.15#.... then it returns DRIVE_CDROM for CD-ROMs and DRIVE_FIXED for fixed drive. But for removable drive it does not return DRIVE_REMOVABLE, it returns DRIVE_FIXED instead. The docs say lpRootPathName [in] Pointer to a null-terminated string that specifies the root directory of the disk to return information about. But what is a root directory? Call with a volume name like \\?\Volume{GUID}\ works as expected but is a device path a valid root directory too? Should calling GetDriveType with a device path work or should I tread it a unsupported? Thanks and Greetings from Germany Uwe
From: Scherbina Vladimir on 10 Jul 2006 06:12 Hello Uwe. To determine whether a drive is a USB-type drive, you should call SetupDiGetDeviceRegistryProperty and specify the SPDRP_REMOVAL_POLICY property. Look at MSDN: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/fs/getdrivetype.asp -- Vladimir "Uwe Sieber" <mail(a)uwe-sieber.de> wrote in message news:4ha8ovF1ptsh1U1(a)individual.net... > > User mode question, just hoping for competent audience here... > > > When I call GetDriveType with a device path like > \\?\USBSTOR#DISK&VEN_SANDISK&PROD_U3_CRUZER_MICRO&REV_2.15#.... > then it returns DRIVE_CDROM for CD-ROMs and DRIVE_FIXED for fixed > drive. But for removable drive it does not return DRIVE_REMOVABLE, > it returns DRIVE_FIXED instead. > > The docs say > > lpRootPathName > [in] Pointer to a null-terminated string that specifies the root directory > of the disk to return information about. > > But what is a root directory? Call with a volume name > like \\?\Volume{GUID}\ works as expected but is a device > path a valid root directory too? > > Should calling GetDriveType with a device path work > or should I tread it a unsupported? > > > Thanks and Greetings from Germany > > Uwe > > > >
|
Pages: 1 Prev: ReadDirectoryChangesW Next: memory allocation fails |