ScanVolumeEx (Compact 2013)
3/26/2014
This function scans a volume for errors in the FAT and directories, and for lost clusters.
Syntax
DWORD ScanVolumeEx(
HANDLE hVolume,
PSCAN_PARAMS psp,
);
Parameters
- hVolume
[in] Handle to disk or partition. Call the CreateFile function to obtain a handle to the volume.
- pdp
[in, out] Pointer to a SCAN_PARAMS structure used to pass in parameters and receive results of the scan.
Return Value
The following table shows return values for this function.
- ERROR_SUCCESS
Occurs if the call to ScanVolumeEx succeeded. Examine the structure returned in the pdp parameter for detailed results.
- ERROR_GEN_FAILURE
Occurs when the system could not successfully call GetPartitionInfo on the store passed in hVolume.
- ERROR_SHARING_VIOLATION
Occurs when the store specified by hVolume is mounted; mounted stores cannot be scanned.
- ERROR_READ_FAULT
Occurs when the system could not read from the store specified in hVolume.
- ERROR_WRITE_FAULT
Occurs when the system could not write to the store specified in hVolume.
- ERROR_UNRECOGNIZED_VOLUME
Occurs when the store specified in hVolume does not contain a recognized file system; needed file system drivers may not be loaded, or the store may be corrupt.
- ERROR_DISK_FULL
Occurs when the store specified in hVolume does not contain enough space to perform the scan.
- ERROR_CANCELLED
Occurs when the operation was canceled by the user.
Remarks
To obtain results of a scan, 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.
If the scan completes, this function returns the scan results through the SCAN_RESULTS structure embedded in the SCAN_PARAMS structure.
Requirements
Header |
scandisk.h |
Library |
Fatutil.dll |
See Also
Reference
FAT Utility Library Functions
CreateFile
SCAN_PARAMS