Link to home
Start Free TrialLog in
Avatar of sisadmin
sisadmin

asked on

formating media

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.
Avatar of ToHo
ToHo

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.
Avatar of sisadmin

ASKER

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?
ASKER CERTIFIED SOLUTION
Avatar of ToHo
ToHo

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial