Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 247
  • Last Modified:

Format floppy with Win32/MFC call?

How can I format a floppy disk with my program?  I want to prompt the user to do so when I save data to a floppy.

Thanks
0
dmetzler
Asked:
dmetzler
1 Solution
 
belovCommented:
You can call CreateFile with \\.\A to get access
to drive A handle, for example, than use DeviceIoControl
function with valid control code - you may want to
call it with IOCTL_STORAGE_GET_MEDIA_TYPES
to obtain heads/cyl/sectors info, and call ti with
IOCTL_DISK_FORMAT_TRACKS supplying
valid information. After that I think you should call
FlushFileBuffers of handle.
0
 
TraelsCommented:
Sure... it just don't work under Win9x... There it seems to be necessary to access the drive, using Assembler and the Devicedriver... strange!!!
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now