DefragVolumeEx (Windows CE 5.0)

Send Feedback

This function defragments files on a volume and removes any unnecessary free space.

DWORD DefragVolumeEx(
HANDLEhVolume,PDEFRAG_PARAMSpdp);

Parameters

  • hVolume
    [in] Handle to a disk or partition. Call CreateFile to obtain a handle to the volume.
  • pdp
    [in, out] Pointer to a DEFRAG_PARAMS structure. This value is used to pass in parameters, as well as receive results of the scan.

Return Values

If the function succeeds, the return value is ERROR_SUCCESS. If it fails, the return value is the appropriate error code.

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

OS Versions: Windows CE .NET 4.2 and later.

Header: Defragdisk.h.

Link Library: Fatutil.dll.

See Also

CreateFile | DeviceIoControl | DEFRAG_PARAMS

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.