OSDev.org https://forum.osdev.org/ |
|
Writing and reading at specifical address of hard disk c++ https://forum.osdev.org/viewtopic.php?f=13&t=31401 |
Page 1 of 1 |
Author: | ComputerMail [ Sun Mar 05, 2017 11:42 am ] |
Post subject: | Writing and reading at specifical address of hard disk c++ |
Hi, i hope i will get an answer here after done 4 forums. I am looking for how to write and read at specifical address in a hard disk under Windows 7. I mean by specifical address, in a sole physical sector https://en.wikipedia.org/wiki/Disk_sector and without taking care of any file or file system. I am using c++. So i specify again i am looking for a fonction in c++ who asks a physical sector address and go to search all bit who are in this sole sector, this fonction should not have relation with any file or file system. |
Author: | dchapiesky [ Sun Mar 05, 2017 12:37 pm ] |
Post subject: | Re: Writing and reading at specifical address of hard disk c |
you open the disk device using a special file name... https://support.microsoft.com/en-us/hel ... nder-win32 open with CreateFile https://msdn.microsoft.com/en-us/library/windows/desktop/aa363858(v=vs.85).aspx calculate offset into file using sector size and off you go.... cheers |
Author: | Schol-R-LEA [ Sun Mar 05, 2017 5:55 pm ] |
Post subject: | Re: Writing and reading at specifical address of hard disk c |
dchapiesky wrote: https: //msdn.microsoft.com/en-us/library/windows/desktop/aa363858(v=vs.85).aspx (the above link is broken intentionally - COPY the link and remove space between https: and // cause the forum does not like the address with .aspx ending) Wouldn't it have been easier just to wrap it in a BBcode 'url' tag instead? |
Author: | dchapiesky [ Sun Mar 05, 2017 7:09 pm ] |
Post subject: | Re: Writing and reading at specifical address of hard disk c |
well alrighty then.... thanks! |
Page 1 of 1 | All times are UTC - 6 hours |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |