Please help me with this one :
How can I write to the hard disk FAT in windows 2000 and XP?
int 13h works only in windows 95/98
Are there any functions in the windows 2000 API that I can use ?
Thanks
Printable View
Please help me with this one :
How can I write to the hard disk FAT in windows 2000 and XP?
int 13h works only in windows 95/98
Are there any functions in the windows 2000 API that I can use ?
Thanks
That sounds dangerous! What are you trying to do?
Fortunately, Win2k and XP won't let you do this kind of thing, as they are no longer MS-DOS based. The only way to directly access the FAT (or other file system implementation internals, for that matter) is to write a driver.
On Windows NT/2K/XP, the CreateFile API will allow you to open a handle on the phyisical drive using a pathname of "\\.\PHYSICALDRIVE0" for the first device, "\\.\PHYSICALDRIVE1" for the second, and so on.
I'd suggest trying CreateFile with GENERIC_READ access and then reading the first dozen or so blocks (and don't use GENERIC_WRITE unless you really know what you're doing).
-rick