Opening raw character device in DOS/Windows 98

Discussion in 'C Programming' started by rxhofman@yahoo.co.uk, May 2, 2007.

  1. Guest

    Hello all,

    I want to create my own filesystem on a flash memory card. How can I
    open the card as a raw character device?

    On a unix-like system I can just open /dev/hdx as a file and do
    whatever I want. How can I achieve the same thing under MS DOS or
    Windows 98?

    Thanks!

    Hof
     
    , May 2, 2007
    #1
    1. Advertising

  2. In article <>,
    <> wrote:
    >I want to create my own filesystem on a flash memory card. How can I
    >open the card as a raw character device?


    filesystems and flash memory cards and raw character devices
    are all system-specific, not mentioned by the standard C language.


    >On a unix-like system I can just open /dev/hdx as a file and do
    >whatever I want. How can I achieve the same thing under MS DOS or
    >Windows 98?


    You'd need to ask in a system specific newsgroup. All that
    C provides is fopen() with a "b" modifier on the file mode
    (to indicate binary). Determining the correct filename to open
    (or whatever else needs to be done to get a hook to the device)
    is system specific.
    --
    Is there any thing whereof it may be said, See, this is new? It hath
    been already of old time, which was before us. -- Ecclesiastes
     
    Walter Roberson, May 2, 2007
    #2
    1. Advertising

  3. In article <>,
    <> wrote:
    >Hello all,
    >
    >I want to create my own filesystem on a flash memory card. How can I
    >open the card as a raw character device?
    >
    >On a unix-like system I can just open /dev/hdx as a file and do
    >whatever I want. How can I achieve the same thing under MS DOS or
    >Windows 98?


    Let me just say, with all sincerity and love:

    Off topic. Not portable. Cant discuss it here. Blah, blah, blah.

    Useful clc-related links:

    http://en.wikipedia.org/wiki/Aspergers
    http://en.wikipedia.org/wiki/Clique
    http://en.wikipedia.org/wiki/C_programming_language
     
    Kenny McCormack, May 2, 2007
    #3
  4. Guest

    On 2 May, 18:48, -cnrc.gc.ca (Walter Roberson) wrote:
    > In article <>,
    >
    > <> wrote:
    > >I want to create my own filesystem on a flash memory card. How can I
    > >open the card as a raw character device?

    >
    > filesystems and flash memory cards and raw character devices
    > are all system-specific, not mentioned by the standard C language.
    >
    > >On a unix-like system I can just open /dev/hdx as a file and do
    > >whatever I want. How can I achieve the same thing under MS DOS or
    > >Windows 98?

    >
    > You'd need to ask in a system specific newsgroup. All that
    > C provides is fopen() with a "b" modifier on the file mode
    > (to indicate binary). Determining the correct filename to open
    > (or whatever else needs to be done to get a hook to the device)
    > is system specific.
    > --
    > Is there any thing whereof it may be said, See, this is new? It hath
    > been already of old time, which was before us. -- Ecclesiastes




    Thanks, Walter. Apologies for the off-topic post - I wondered if there
    was some strange and wonderful system call provided on DOS platforms
    that C experts would be familiar with. All the DOS newsgroups seem to
    have very little activity.

    Regards,

    Hof
     
    , May 2, 2007
    #4
    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. Ben Fairbank
    Replies:
    2
    Views:
    5,460
  2. john san
    Replies:
    19
    Views:
    743
    Diez B. Roggisch
    Feb 18, 2005
  3. tomhr
    Replies:
    27
    Views:
    1,421
    Mike Wahler
    Jan 12, 2006
  4. Matt
    Replies:
    0
    Views:
    477
  5. Robert Wallace

    my own perl "dos->unix"/"unix->dos"

    Robert Wallace, Jan 21, 2004, in forum: Perl Misc
    Replies:
    7
    Views:
    281
    Michele Dondi
    Jan 22, 2004
Loading...

Share This Page