Solved

Format floppy with Win32/MFC call?

Posted on 1997-09-02
2
212 Views
Last Modified: 2013-11-20
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
Comment
Question by:dmetzler
2 Comments
 
LVL 1

Accepted Solution

by:
belov earned 100 total points
ID: 1305596
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
 

Expert Comment

by:Traels
ID: 3001464
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

Active Directory Webinar

We all know we need to protect and secure our privileges, but where to start? Join Experts Exchange and ManageEngine on Tuesday, April 11, 2017 10:00 AM PDT to learn how to track and secure privileged users in Active Directory.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
child constructor and parent constructor, overriding and overloading 6 88
zeroFront challenge 7 114
Unix Command -- Challenging  question 7 96
mapAB Challlenge 35 158
Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question