The MASM Forum

General => The Workshop => Topic started by: shaikkareem on June 04, 2014, 08:06:02 PM

Title: how to communicate .......with usb mass storage divices
Post by: shaikkareem on June 04, 2014, 08:06:02 PM
hello every one.....

i used the windows api functions to communicate with usb mass storage devices......in the case the devices are detected by the computer and after said 'ready for use'. here every thing is cool because we got the drive litter to be used in CreateFile function and all necessary operation we want might become easier to implement......this is one side of a coin....
but, on the other side , what if the mass storage device (like pendrives,sd cards..) is not recognized by the computer and not ready for the use....what i've to do   to gain access to the attached and not recognized usb device......

after all the recognized devices using operations on it only give information about formatted file system[fat32,ntfs,fat16,exfat] data.....not data from restricted areas of sd cards............

so what i've to do..................take hand over these situations........
Title: Re: how to communicate .......with usb mass storage divices
Post by: qWord on June 04, 2014, 09:00:36 PM
Quote from: shaikkareem on June 04, 2014, 08:06:02 PM....what i've to do   to gain access to the attached and not recognized usb device......
....................................................... you .................. probably need to write ....................................... some kind of ................................ driver software in such cases ................................................................................................ see: Developing Windows client drivers for USB devices (http://msdn.microsoft.com/en-us/library/windows/hardware/hh406260%28v=vs.85%29.aspx)
Title: Re: how to communicate .......with usb mass storage divices
Post by: Zen on June 10, 2014, 03:22:37 AM
SHAIKKEREEM,
QWORD is correct about writing a USB driver.
However, for user-mode functions, like detection (when you insert a USB device), you can use the: Setup API. MSDN (http://msdn.microsoft.com/en-us/library/cc185682(v=vs.85).aspx). It's pretty limited, though.