Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Format floppy with Win32/MFC call?

Posted on 1997-09-02
2
Medium Priority
?
244 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 1

Accepted Solution

by:
belov earned 200 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: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone 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

Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
In this post we will learn different types of Android Layout and some basics of an Android App.
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.
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Suggested Courses

610 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