Raw reading of memory stick in Vaio laptop

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
 
A

Arno Wagner

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
 
E

Eric Gisin

You do not need ioctl to read. You should open \\.\PhysicalDrive# and ReadFile it.
 
M

mscotgrove

Thanks, ReadFile does work. Any idea why the IOCTL commands don't
work?

Michael
 
E

Eric Gisin

If a card reader is USB storage model, then SCSI-2 commands work.
Otherwise it could just be disk driver without SCSI.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top