Lamont
2007-08-12 18:58:03 UTC
Not sure if this is the right forum.
I clicked the wrong disk when formatting and blew away the MBR and Partition
Boot Sectors of my 160GB USB drive.
I understand I must not do fixes on this drive, but copy sector by sector to
another disk and do fixes on the "image" of the data there.
So, I just got a 750 GIG USB drive for recovery use.
I am under the impression that code which accesses a physical device must
run in the kernel, so I would like to learn how to do this.
(I took a C++ programming course about 100 years ago.)
I suppose that when I know how to make my code run in the kernel, then I
don't use CREATEFILE, because I am reading 1 sector at a time.
I am under the impression that to make a process run in the kernel requires
requires setting bit 13, the I/O privilege level in the EFLAGS register.
But when I read about calling device IO control and about file management
functions I find no mention of setting the privilege level in the EFLAGS
register.
I wonder if I am on the right track or going the wrong direction. Do I
need to get the Driver Development Kit and use its special compiler to access
a USB disk?
Thank you for kind assistance.
I clicked the wrong disk when formatting and blew away the MBR and Partition
Boot Sectors of my 160GB USB drive.
I understand I must not do fixes on this drive, but copy sector by sector to
another disk and do fixes on the "image" of the data there.
So, I just got a 750 GIG USB drive for recovery use.
I am under the impression that code which accesses a physical device must
run in the kernel, so I would like to learn how to do this.
(I took a C++ programming course about 100 years ago.)
I suppose that when I know how to make my code run in the kernel, then I
don't use CREATEFILE, because I am reading 1 sector at a time.
I am under the impression that to make a process run in the kernel requires
requires setting bit 13, the I/O privilege level in the EFLAGS register.
But when I read about calling device IO control and about file management
functions I find no mention of setting the privilege level in the EFLAGS
register.
I wonder if I am on the right track or going the wrong direction. Do I
need to get the Driver Development Kit and use its special compiler to access
a USB disk?
Thank you for kind assistance.
--
Lamont Phemister
Lamont Phemister