Compartilhar via


FormatPartitionEx (Windows CE 5.0)

Send Feedback

This function formats the partition with the default file system of the loaded partition driver.

BOOL WINAPI FormatPartitionEx(HANDLE hPartition,BYTE bPartType,BOOL bAuto);

Parameters

  • hPartition
    [in] Handle to the partition returned from OpenPartition.
  • bPartType
    [in] Partition type. For more information on partition types, see Partition Manager.
  • bAuto
    [in] When this flag is set, bPartType is ignored and the partition driver is allowed to generate the appropriate partition type for the default file system type that it supports. A file allocation table (FAT) file system selects a partition type based on the number of sectors in this partition, which can be FAT12, FAT16, or FAT32.

Return Values

Returns TRUE if successful, otherwise FALSE.

Remarks

A partition must have already been created using CreatePartition before it can be formatted using FormatPartitionEx.

FormatPartitionEx erases sector zero of a specified partition, and updates the partition type in the Master Boot Record; it does not actually write a file system format such as FATFS. To write a file system format, call FormatVolume.

Requirements

OS Versions: Windows CE .NET 4.0 and later.
Header: Storemgr.h
Link Library: Storeapi.lib

See Also

OpenPartition | Partition Manager | Storage Manager Functions

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.