Opening a drive...need help
-
I am doing direct disk IO on a Compact Flash card (using Win32 CreateFile API) which is connected to the PC via a USB flash reader. This card is mapped to my machine as a "device with removable storage" and has the drive letter H: On some other machine, Windows will map it with some different drive letter (e.g. I, K etc). I don't want to hard code the drive letter H: or K: in my code, rather want to automatically detect that H: or K: is my desired drive. How can this be done? Can anyone help? Pardon me if this is a stupid question as I am new to C++ and Windows programming. Thanks dranne
-
I am doing direct disk IO on a Compact Flash card (using Win32 CreateFile API) which is connected to the PC via a USB flash reader. This card is mapped to my machine as a "device with removable storage" and has the drive letter H: On some other machine, Windows will map it with some different drive letter (e.g. I, K etc). I don't want to hard code the drive letter H: or K: in my code, rather want to automatically detect that H: or K: is my desired drive. How can this be done? Can anyone help? Pardon me if this is a stupid question as I am new to C++ and Windows programming. Thanks dranne
Look at following code project article http://www.codeproject.com/w2k/usbdisks.asp?df=100 I hope it helps.
-
I am doing direct disk IO on a Compact Flash card (using Win32 CreateFile API) which is connected to the PC via a USB flash reader. This card is mapped to my machine as a "device with removable storage" and has the drive letter H: On some other machine, Windows will map it with some different drive letter (e.g. I, K etc). I don't want to hard code the drive letter H: or K: in my code, rather want to automatically detect that H: or K: is my desired drive. How can this be done? Can anyone help? Pardon me if this is a stupid question as I am new to C++ and Windows programming. Thanks dranne
Is ur Application (which has to perform the disk IO) installed on the PC or on the USB flash reader ? If the Application runs from the PC (rather than from the USB flash drive) is there a posssible scenario of mutliple USB flash drives are connected to the PC and u have to uniquely identify each USB flash drive and perform a different disk IO ? Vipin.