次の方法で共有


DefragVolumeEx (Compact 2013)

3/26/2014

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

Syntax

DWORD DefragVolumeEx(
  HANDLE hVolume,
  PDEFRAG_PARAMS pdp
);

Parameters

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

Return Value

ERROR_SUCCESS indicates success. Other error codes indicate the reason for 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.

Link Library: Fatutil.dll.

Requirements

Header

defragdisk.h

Library

Fatutil.dll

See Also

Reference

FAT Utility Library Functions
CreateFile
DEFRAG_PARAMS

Other Resources

DeviceIoControl