Thread: Fromatting floppy

  1. #16
    Registered User
    Join Date
    Oct 2001
    Posts
    2,934
    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);

  2. #17
    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.

  3. #18
    Unregistered
    Guest
    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..

  4. #19
    Its not rocket science vasanth's Avatar
    Join Date
    Jan 2002
    Posts
    1,683
    WHat happened? Does no one have a answer for this.

  5. #20
    Skunkmeister Stoned_Coder's Avatar
    Join Date
    Aug 2001
    Posts
    2,572
    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

  6. #21
    Its not rocket science vasanth's Avatar
    Join Date
    Jan 2002
    Posts
    1,683
    Ok thanks i will try...........

  7. #22
    Registered User
    Join Date
    Feb 2002
    Posts
    14
    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

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. floppy eraser error catching!
    By mabufo in forum C++ Programming
    Replies: 7
    Last Post: 01-23-2005, 02:06 PM
  2. formatting a floppy in C
    By McMullet in forum C Programming
    Replies: 2
    Last Post: 10-10-2004, 05:20 AM
  3. making a proper image for floppy
    By EvBladeRunnervE in forum Tech Board
    Replies: 4
    Last Post: 07-31-2004, 11:27 PM
  4. selecting input from a floppy
    By neilman88 in forum C++ Programming
    Replies: 1
    Last Post: 04-17-2003, 02:26 PM