In windows, I think one way to format a floppy is:
#include <windows.h>
.
.
BOOL DeviceIoControl(hDevice, IOCTL_DISK_FORMAT_TRACKS, lpInBuffer, nInBufferSize, NULL, 0, lpBytesReturned, lpOverlapped);
In windows, I think one way to format a floppy is:
#include <windows.h>
.
.
BOOL DeviceIoControl(hDevice, IOCTL_DISK_FORMAT_TRACKS, lpInBuffer, nInBufferSize, NULL, 0, lpBytesReturned, lpOverlapped);
I saw something in bios.h that accessed the disc, and one of the funtion's arguements had a comment that said //to format a disc
Now I don't know anything about disc sectors, or anything like that, so I won't be able to answer your question.
well i think it is possible without using the os to format a disk.. Since C compiler allows direct access to many resiurces such as the bios etc.. FOr example the cmos can be accesses and modified . The bios.h header file i think allows us do that.. May be there is a way to format a floppy using this header..
WHat happened? Does no one have a answer for this.
Use the features of the operating system to do it. The only time you would need to not use an os route would be if there was no operating system in which case you would almost certainly need to use assembly to do it and that is beyond the scope of these boards. Try the assembly board at www.programmersheaven.com
Last edited by Stoned_Coder; 02-07-2002 at 09:38 AM.
Free the weed!! Class B to class C is not good enough!!
And the FAQ is here :- http://faq.cprogramming.com/cgi-bin/smartfaq.cgi
my 2 cents, not sure what you are looking to do outside formatting A without using system("format a:") but you'll also need to use #include <dos.h> if my memory serves me correctly??
James