Directly reading/writing a HDD

G

galapogos

Hi,

I'm writing a console program to directly read from and write to an
external USB HDD in sector level(so that I can access the drive w/o it
even being initialized/partitioned/formatted, and I'm wondering how to
get started. I've only done file level I/O before on directly
connected drives so I'm not sure how to identify the USB drive(USB VID/
PID/serial number maybe?) and also how to address it directly. Are
there any primers for this to help me get started?

I tried playing around with GetLogicalDrives(),
GetLogicalDriveStrings() and CreateFile(), but these seem to work at
the logical level, so I don't know exactly which physical drive I'm
accessing.

Thanks!
 
K

Keith Thompson

galapogos said:
I'm writing a console program to directly read from and write to an
external USB HDD in sector level(so that I can access the drive w/o it
even being initialized/partitioned/formatted, and I'm wondering how to
get started. I've only done file level I/O before on directly
connected drives so I'm not sure how to identify the USB drive(USB VID/
PID/serial number maybe?) and also how to address it directly. Are
there any primers for this to help me get started?

This is system-specific. You'll need to ask in a newsgroup that deals
with your operating system.
 
G

galapogos

This is system-specific. You'll need to ask in a newsgroup that deals
with your operating system.

--
Keith Thompson (The_Other_Keith) (e-mail address removed) <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"

The target OS will either be WinXP or Linux, most probably WinXP since
development is being done as a Win32 console application.
 
R

Richard Heathfield

galapogos said:
The target OS will either be WinXP or Linux, most probably WinXP since
development is being done as a Win32 console application.

Then try <
 

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

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,053
Latest member
BrodieSola

Latest Threads

Top