Go4Expert

Go4Expert (http://www.go4expert.com/)
-   C++ (http://www.go4expert.com/forums/cpp/)
-   -   c++ handle help? (http://www.go4expert.com/forums/cpp-handle-help-t7528/)

tootypegs 25Nov2007 18:01

c++ handle help?
 
Hi basically i have a program that gets a handle on a USB device lusing '\\\\?\\e:' but i want to be able to get a handle on it using its device instance id 'STORAGE\REMOVABLEMEDIA\7&324ACC50&0&RM:'

How do i impliment this, i have tried the following below and it just doesnt work but i guessed it wouldnt be this easy, any ideas????????? any help would be apreciated!!?

HANDLE hRead = CreateFile(
//("\\\\?\\E:"),
(" \\\\.\\STORAGE\REMOVABLEMEDIA\7&324ACC50&0&RM:"),
FILE_GENERIC_READ,
FILE_SHARE_READ,
NULL,
OPEN_EXISTING,
0,
NULL);



Thank you! :)


All times are GMT +5.5. The time now is 13:19.