Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

formating media

Posted on 2001-06-04
3
Medium Priority
?
198 Views
Last Modified: 2006-11-17
Hi.
I need to format media (M.O. Disk or EOD) from my program.
I try the format utility, but it returns me "Can't read partition table". Where can I find any info about format failures and are there any other ways to format media?
Thank You in advance.
0
Comment
Question by:sisadmin
  • 2
3 Comments
 
LVL 2

Expert Comment

by:ToHo
ID: 6155331
Hi

If you are programming in VC there is a function called DeviceIoControl that can be used to format tracks on the disk. This will give extended failure information.
0
 
LVL 1

Author Comment

by:sisadmin
ID: 6155370
from DeviceIoControl reference:

dwIoControlCode
[in] Specifies the control code for the operation. This value identifies the specific operation to be performed and the type of device on which the operation is to be performed. No specific values are defined for the dwIoControlCode parameter. However, the writer of a custom device driver can define IOCTL_XXXX control codes, per the CTL_CODE macro. These control codes can then be advertised, and an application can use these control codes with DeviceIoControl to perform the driver-specific functions.

What is the IOCTL code for format and what is the format of parameter passing for this command?
0
 
LVL 2

Accepted Solution

by:
ToHo earned 400 total points
ID: 6155412
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

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

Unlike C#, C++ doesn't have native support for sealing classes (so they cannot be sub-classed). At the cost of a virtual base class pointer it is possible to implement a pseudo sealing mechanism The trick is to virtually inherit from a base class…
Article by: SunnyDark
This article's goal is to present you with an easy to use XML wrapper for C++ and also present some interesting techniques that you might use with MS C++. The reason I built this class is to ease the pain of using XML files with C++, since there is…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

972 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