-
October 4th, 2009, 03:12 PM
#1
[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.
-
October 4th, 2009, 10:26 PM
#2
Re: HELP -> File I/O
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."
-
October 5th, 2009, 04:31 AM
#3
Re: HELP -> File I/O
Thanks for nothing, souldog.
-
October 5th, 2009, 06:55 AM
#4
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.
-
October 5th, 2009, 07:40 AM
#5
Re: HELP -> File I/O
Originally Posted by salehhamadeh
[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.
-
October 5th, 2009, 10:51 AM
#6
Re: HELP -> File I/O
Originally Posted by rdrast
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."
-
October 5th, 2009, 12:33 PM
#7
Re: [RESOLVED] HELP -> File I/O
I didn't want windows to use it, I just wanted my own explorer to use it.
-
October 5th, 2009, 12:42 PM
#8
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."
-
October 5th, 2009, 04:18 PM
#9
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|