Directly reading/writing a HDD

Discussion in 'C Programming' started by galapogos, May 7, 2007.

  1. galapogos

    galapogos Guest

    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!
    galapogos, May 7, 2007
    #1
    1. Advertising

  2. galapogos <> writes:
    > 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) <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"
    Keith Thompson, May 7, 2007
    #2
    1. Advertising

  3. galapogos

    galapogos Guest

    On May 7, 11:10 am, Keith Thompson <> wrote:
    > galapogos <> writes:
    > > 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) <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.
    galapogos, May 7, 2007
    #3
  4. galapogos said:

    > On May 7, 11:10 am, Keith Thompson <> wrote:
    >> galapogos <> writes:
    >> > 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.
    Richard Heathfield, May 7, 2007
    #4
  5. galapogos

    galapogos Guest

    On May 7, 12:00 pm, Richard Heathfield <> wrote:
    > galapogos said:
    >
    > > On May 7, 11:10 am, Keith Thompson <> wrote:
    > >> galapogos <> writes:
    > >> > 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.
    galapogos, May 7, 2007
    #5
  6. In article <>,
    Keith Thompson <> wrote:
    >galapogos <> writes:
    >> 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.
    Kenny McCormack, May 16, 2007
    #6
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Toma
    Replies:
    1
    Views:
    358
    hugo batista
    May 4, 2004
  2. =?Utf-8?B?QXNoYQ==?=

    Writing xml to hdd

    =?Utf-8?B?QXNoYQ==?=, Jun 24, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    329
    avnrao
    Jun 24, 2004
  3. Replies:
    7
    Views:
    5,673
    Real Gagnon
    Apr 1, 2006
  4. Benjamin de Waal
    Replies:
    5
    Views:
    1,299
    Benjamin de Waal
    Mar 3, 2005
  5. Gnurto
    Replies:
    3
    Views:
    1,230
    Victor Bazarov
    Dec 5, 2005
Loading...

Share This Page