[RESOLVED] HELP -> File I/O
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 9 of 9

Thread: [RESOLVED] HELP -> File I/O

Hybrid View

  1. #1
    Join Date
    Sep 2009
    Posts
    57

    [RESOLVED] HELP -> File I/O

    Hi gurus,
    I'm willing to create my own file system, which I will use for my external hard disk. Can anyone tell me how to read binary data from the hard disk and write to it. Thanks 4 help.

  2. #2
    Join Date
    Nov 2002
    Location
    Los Angeles, California
    Posts
    3,863

    Re: HELP -> File I/O

    Are you joking?
    Wakeup in the morning and kick the day in the teeth!! Or something like that.

    "i don't want to write leak free code or most efficient code, like others traditional (so called expert) coders do."

  3. #3
    Join Date
    Sep 2009
    Posts
    57

    Re: HELP -> File I/O

    Thanks for nothing, souldog.

  4. #4
    Join Date
    Sep 2009
    Posts
    57

    Re: HELP -> File I/O

    [Problem Resolved]
    I searched MSDN and used the WIN32 API CreateFile() to open the physical drive and the WIN32 API ReadFile() to store the data into a buffer.

  5. #5
    Join Date
    Apr 2005
    Posts
    107

    Re: HELP -> File I/O

    Quote Originally Posted by salehhamadeh View Post
    [Problem Resolved]
    I searched MSDN and used the WIN32 API CreateFile() to open the physical drive and the WIN32 API ReadFile() to store the data into a buffer.
    That's not exactly creating your own file system though...
    For your own FS, you would need to first come up with a physical storage method, including directories and allocations on disk, then write an Installable File System driver for Windows to use it.

  6. #6
    Join Date
    Nov 2002
    Location
    Los Angeles, California
    Posts
    3,863

    Re: HELP -> File I/O

    Quote Originally Posted by rdrast View Post
    That's not exactly creating your own file system though...
    For your own FS, you would need to first come up with a physical storage method, including directories and allocations on disk, then write an Installable File System driver for Windows to use it.
    Which is why I asked if you were joking.
    Wakeup in the morning and kick the day in the teeth!! Or something like that.

    "i don't want to write leak free code or most efficient code, like others traditional (so called expert) coders do."

  7. #7
    Join Date
    Sep 2009
    Posts
    57

    Re: [RESOLVED] HELP -> File I/O

    I didn't want windows to use it, I just wanted my own explorer to use it.

  8. #8
    Join Date
    Nov 2002
    Location
    Los Angeles, California
    Posts
    3,863

    Re: [RESOLVED] HELP -> File I/O

    you might want to consider using the C++ io streams for writing and reading binary files. They are easier to use than directly using the WIN32 API.

    http://www.cplusplus.com/reference/iostream/

    you would be using fstream with the flag std::ios::binary
    Wakeup in the morning and kick the day in the teeth!! Or something like that.

    "i don't want to write leak free code or most efficient code, like others traditional (so called expert) coders do."

  9. #9
    Join Date
    Sep 2009
    Posts
    57

    Re: [RESOLVED] HELP -> File I/O

    I know how to use fstreams for handling files, but my problem is that I want to access a physical drive. Is there a way fstreams can access physical drives?

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center