FormatVolume (Windows Embedded CE 6.0)
1/6/2010
This function formats a volume.
Syntax
DWORD FormatVolume(
HANDLE hVolume,
PDISK_INFO pdi,
PFORMAT_OPTIONS pfo,
PFN_PROGRESS pfnProgress,
PFN_PROGRESS pfnMessage
);
Parameters
- hVolume
[in] Handle to disk or partition. Call the CreateFile function to obtain a handle to the volume.
- pdi
[in] Not used.
pfo
[in] Pointer to a FORMAT_OPTIONS structure. The following tables shows possible values.Member Description dwClusSize
Desired cluster size in bytes, which must be a power of 2.
dwFatVersion
FAT Version, either 12, 16, or 32.
dwNumFats
Number of FATs to create.
dwRootEntries
Desired number of root directory entries.
fFullFormat
Set to TRUE to request a full format.
- pfnProgress
[in] Callback function indicating progress.
- pfnMessage
[in] Callback function used to display a message to the user.
Return Value
ERROR_SUCCESS indicates success. ERROR_GEN_FAILURE indicates failure.
Remarks
For best results, use the correct type of handle. For example, if the store to be scanned is partitioned, use a handle to the partition. If the store is not partitioned, use a disk handle.
Requirements
Header | formatdisk.h |
Library | Fatutil.dll |
Windows Embedded CE | Windows CE .NET 4.0 and later |
See Also
Reference
FAT Utility Library Functions
CreateFile
FORMAT_OPTIONS