Click here to Skip to main content
16,013,489 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Reading a USB device Pin
koumodaki27-Mar-08 9:20
koumodaki27-Mar-08 9:20 
GeneralRe: Reading a USB device Pin
koumodaki27-Mar-08 9:31
koumodaki27-Mar-08 9:31 
GeneralRe: Reading a USB device Pin
David Crow27-Mar-08 9:34
David Crow27-Mar-08 9:34 
QuestionRe: Reading a USB device Pin
koumodaki27-Mar-08 9:40
koumodaki27-Mar-08 9:40 
GeneralRe: Reading a USB device Pin
JudyL_MD27-Mar-08 9:31
JudyL_MD27-Mar-08 9:31 
GeneralRe: Reading a USB device Pin
koumodaki27-Mar-08 9:41
koumodaki27-Mar-08 9:41 
QuestionRe: Reading a USB device Pin
David Crow27-Mar-08 10:14
David Crow27-Mar-08 10:14 
GeneralRe: Reading a USB device Pin
JudyL_MD27-Mar-08 10:25
JudyL_MD27-Mar-08 10:25 
If you follow Win32_SystemDevices to Win32_PnPEntity, you should find a leaf with a device id something like USBSTOR.....
From there, you can get (look under Win32_PnPDevice) the correct DeviceId to use for Win32_DiskDrive.
From there, you can get (look under Win32_DiskDriveToDiskPartition) the correct DeviceId to use for Win32_DiskPartition.
From there, you can get (look under Win32_LogicalDiskToPartition) the correct DeviceId to use for Win32_LogicalDisk.
That final device id is the logical drive number.

(Whew!! <wiping brow="">)

Getting that first USBSTOR... monster string is what's usually the hardest part of this sort of thing since you have to use the SetupDi API. That is truly nasty!!

Judy
GeneralRe: Reading a USB device Pin
David Crow27-Mar-08 10:30
David Crow27-Mar-08 10:30 
QuestionAutomatically generate serialization code? Pin
Adrian Idar (Ln)27-Mar-08 5:53
Adrian Idar (Ln)27-Mar-08 5:53 
QuestionRe: Automatically generate serialization code? Pin
CPallini27-Mar-08 6:00
mveCPallini27-Mar-08 6:00 
QuestionGdiplus::Bitmap will using a file in read-exclusive mode? Pin
followait27-Mar-08 5:11
followait27-Mar-08 5:11 
Questionhow to hook the window API such as messagebox? thanks Pin
King Tran27-Mar-08 5:10
King Tran27-Mar-08 5:10 
AnswerRe: how to hook the window API such as messagebox? thanks Pin
James R. Twine27-Mar-08 7:32
James R. Twine27-Mar-08 7:32 
AnswerRe: how to hook the window API such as messagebox? thanks Pin
Stephen Hewitt27-Mar-08 14:35
Stephen Hewitt27-Mar-08 14:35 
GeneralRe: how to hook the window API such as messagebox? thanks Pin
King Tran29-Mar-08 2:45
King Tran29-Mar-08 2:45 
GeneralHelp me please Pin
Member 417463927-Mar-08 4:31
Member 417463927-Mar-08 4:31 
GeneralRe: Help me please PinPopular
led mike27-Mar-08 4:42
led mike27-Mar-08 4:42 
GeneralRe: Help me please Pin
David Crow27-Mar-08 4:57
David Crow27-Mar-08 4:57 
GeneralRe: Help me please Pin
led mike27-Mar-08 5:05
led mike27-Mar-08 5:05 
GeneralRe: Help me please Pin
Member 417463927-Mar-08 5:26
Member 417463927-Mar-08 5:26 
QuestionRe: Help me please Pin
CPallini27-Mar-08 5:34
mveCPallini27-Mar-08 5:34 
GeneralRe: Help me please Pin
Member 417463927-Mar-08 5:43
Member 417463927-Mar-08 5:43 
GeneralRe: Help me please Pin
CPallini27-Mar-08 5:58
mveCPallini27-Mar-08 5:58 
GeneralRe: Help me please Pin
toxcct27-Mar-08 6:19
toxcct27-Mar-08 6:19 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.