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

C / C++ / MFC

 
QuestionRe: Reading a USB device Pin
David Crow27-Mar-08 8:34
David Crow27-Mar-08 8:34 
GeneralRe: Reading a USB device Pin
koumodaki27-Mar-08 9:13
koumodaki27-Mar-08 9:13 
QuestionRe: Reading a USB device Pin
David Crow27-Mar-08 9:17
David Crow27-Mar-08 9:17 
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 
koumodaki wrote:
I can pass the handle I obtain while opening the usb flash drive from CreateFile() to this function.


The problem is that this handle is a handle to the physical drive. You can't use that to easily find a file on the drive.

Your basic problem is how to convert from a USB identifier to the logical hard drive letter. Using WMI you can go from something like USBSTOR\\DISK&VEN_SANDISK&PROD_CRUZER_MINI&REV_0.1\\20041100801E102869&0 (to take an example not at random) to G:. Stick the USB flash in your system, fire up the WMI object browser and you can see the queries you need to make to WMI to go from the former to the latter.

Judy
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 
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 

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.