1. We have moved from vBulletin to XenForo and you are viewing the site in the middle of the move. Though the functional aspect of everything is working fine, we are still working on other changes including the new design on Xenforo.
    Dismiss Notice

c++ handle help?

Discussion in 'C++' started by tootypegs, Nov 25, 2007.

  1. tootypegs

    tootypegs New Member

    Joined:
    Nov 25, 2007
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    0
    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! :)
     

Share This Page