473,320 Members | 1,921 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Directly reading/writing a HDD

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!

May 7 '07 #1
5 2246
galapogos <go*****@gmail.comwrites:
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.

--
Keith Thompson (The_Other_Keith) ks***@mib.org <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"
May 7 '07 #2
On May 7, 11:10 am, Keith Thompson <k...@mib.orgwrote:
galapogos <gois...@gmail.comwrites:
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.

--
Keith Thompson (The_Other_Keith) k...@mib.org <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.

May 7 '07 #3
galapogos said:
On May 7, 11:10 am, Keith Thompson <k...@mib.orgwrote:
>galapogos <gois...@gmail.comwrites:
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.

The target OS will either be WinXP or Linux, most probably WinXP since
development is being done as a Win32 console application.
Then try <news:comp.os.ms-windows.programmer.win32>

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at the above domain, - www.
May 7 '07 #4
On May 7, 12:00 pm, Richard Heathfield <r...@see.sig.invalidwrote:
galapogos said:
On May 7, 11:10 am, Keith Thompson <k...@mib.orgwrote:
galapogos <gois...@gmail.comwrites:
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.
The target OS will either be WinXP or Linux, most probably WinXP since
development is being done as a Win32 console application.

Then try <news:comp.os.ms-windows.programmer.win32>

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999http://www.cpax.org.uk
email: rjh at the above domain, - www.
Thanks, will do.

May 7 '07 #5
In article <ln************@nuthaus.mib.org>,
Keith Thompson <ks***@mib.orgwrote:
>galapogos <go*****@gmail.comwrites:
>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.
IOW, nobody here gives a shit.

May 16 '07 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: DraguVaso | last post by:
Hi, In my application I receive a Byte Stream (Dim bytFile() As Byte) which contains a jpeg-picture, which I want to display in a picturebox. I want to display it directly from the bytfile()...
5
by: Benjamin de Waal | last post by:
Hey all, I'm trying to figure out how to directly write to a device in Windows. Basically, what I'm wanting to do is create an image of a device (specifically, a CompactFlash card that uses a...
4
by: Oliver Knoll | last post by:
According to my ANSI book, tmpfile() creates a file with wb+ mode (that is just writing, right?). How would one reopen it for reading? I got the following (which works): FILE *tmpFile =...
21
by: JoKur | last post by:
Hello, First let me tell you that I'm very new to C# and learning as I go. I'm trying to write a client application to communicate with a server (that I didn't write). Each message from the...
8
by: Tobe | last post by:
For one of our windows apps that has, on one of the windows forms, an instance of a browser (IE), I was given the task of creating a valid string of HTML and using it directly in the browser,...
4
by: Fred Nelson | last post by:
Hi: I have a VB.NET web app that contains a datagrid on a web form that is loaded as follows: DataGrid1.DataSource = lookup.searchnames(getinformation) DataGrid1.DataBind The grid displays...
6
by: arne.muller | last post by:
Hello, I've come across some problems reading strucutres from binary files. Basically I've some strutures typedef struct { int i; double x; int n; double *mz;
12
by: Cagdas Ozgenc | last post by:
Greetings, When directly serializing C++ structures to a file with the standard library functions giving the address of the data and length of structure using the sizeof operator, do I risk...
4
by: Travis | last post by:
Is it considered good practice to call a mutator when inside the same class or modify the attribute directly? So if there's a public method SetName() would it be better from say ::Init() to call...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.