Solved

Format floppy with Win32/MFC call?

Posted on 1997-09-02
2
215 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 Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Host to IP 7 82
Define unique primary key 9 95
canBalance challenge 34 104
Making an alias 7 110
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…
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
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.
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

679 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