Solved

Format floppy with Win32/MFC call?

Posted on 1997-09-02
2
178 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

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
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.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

747 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now