Solved

formating media

Posted on 2001-06-04
3
190 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 100 total points
ID: 6155412
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

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…
What is C++ STL?: STL stands for Standard Template Library and is a part of standard C++ libraries. It contains many useful data structures (containers) and algorithms, which can spare you a lot of the time. Today we will look at the STL Vector. …
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

757 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

21 Experts available now in Live!

Get 1:1 Help Now