Raw reading of memory stick in Vaio laptop

  • Thread starter Thread starter mscotgrove
  • Start date Start date
M

mscotgrove

I have written Windows software to read memory sticks of all kinds via
a USB reader (www.cnwrecovery.com). This is using IOCTL commands.

I am trying to do the same with a Sony Vaio laptop that has a built in
Memory Stick reader. I can see the stick as Drive E:. I can open a
handle using CreateFile. I can also get valid drive parameters using
IOCTL_DISK_GET_DRIVE_GEOMETRY. Then things stop working.

Commands such as Inquiry, and Read do not return error messages, but do
not fill in any data either. (With USB interface they all work).

Can anyone guide me as to where I may find documentation on how to
access the memory stick at sector level.

Thanks

Michael
 
Previously [email protected] said:
I have written Windows software to read memory sticks of all kinds via
a USB reader (www.cnwrecovery.com). This is using IOCTL commands.
I am trying to do the same with a Sony Vaio laptop that has a built in
Memory Stick reader. I can see the stick as Drive E:. I can open a
handle using CreateFile. I can also get valid drive parameters using
IOCTL_DISK_GET_DRIVE_GEOMETRY. Then things stop working.
Commands such as Inquiry, and Read do not return error messages, but do
not fill in any data either. (With USB interface they all work).
Can anyone guide me as to where I may find documentation on how to
access the memory stick at sector level.

Interesting. I have never had issues with the reader on my old
Vaio (which died due to shoddy engineering on Sonys side).
I also think I just used the standard Linux USB storege driver.

Maybe have a look into the Linux kernel USB storage driver for
inspiration and a check with a current Linux kernel to see whether
it can do what you want?

Arno
 
You do not need ioctl to read. You should open \\.\PhysicalDrive# and ReadFile it.
 
If a card reader is USB storage model, then SCSI-2 commands work.
Otherwise it could just be disk driver without SCSI.
 
Back
Top