![]() |
| Home |
|
|
Function RTFFormatExFATFunction RTFFormatExFAT formats a logical drive with the exFAT file system:
int RTFFormatExFAT(const char * DriveName,
UINT SectorsPerCluster,
RTFFormatCallback Progress,
DWORD Flags);
ParametersDriveNameMust be a logical drive file name in the form "\\.\X:", where "X" is replaced with the drive letter of the logical drive to be formatted. SectorsPerClusterSpecifies the desired number of sectors per cluster. This parameter should be 0 to use a default cluster size, or a power of 2 between 1 and 65536. ProgressA callback to supply progress information:
typedef void (__cdecl * RTFFormatCallback)(const char * DeviceName,
int Action,
DWORD Total,
DWORD Completed);
It will be called periodically by RTFFormatExFAT. Parameter Action can have one of the following values:
Total indicates how many sectors must be processed. Completed indicates how many sectors have been processed successfully. The Progress parameter for RTFFormatExFAT is optional and may be set to NULL. FlagsControls various options about how to format the drive. It can be zero or any combination of the following flags:
return valueIf the function succeeds, the return value is RTF_NO_ERROR. If it fails, the return value is a negative error code. Demo programs RTFCmd and PartDemo use this function. RTFFormatExFAT does not perform a surface scan on the volume. Only if writing to any system portion of the drive fails, the function returns the respective error code.
|