ScanVolume (Windows CE 5.0)
This function scans a volume for errors in the FAT and directories, and for lost clusters according to the options specified.
BOOL ScanVolume(
HANDLEhVolume,PDISK_INFOpdi,PSCAN_OPTIONSpso,PFN_PROGRESSpfnProgress,PFN_MESSAGEpfnMessage);
Parameters
- hVolume
[in] Handle to disk or partition. Call CreateFile to obtain a handle to the volume. - pdi
[in] Pointer to a DISK_INFO structure. Can be obtain through a DeviceIoControl call to the appropriate drive with the condition code DISK_IOCTL_GETINFO. - pso
[in] Pointer to a SCAN_OPTIONS structure. The following fields can be specified.Member Description fVerifyFix TRUE if prompt user to perform a fix. dwFatToUse Indicates which FAT to use for scanning (one-based indexing). - pfnProgress
[in] Callback function indicating progress. - pfnMessage
[in] Callback function used to display a message to user.
Return Values
If the function succeeds, the return value is TRUE. If it fails, the return valid is FALSE. Typical reasons for failing would be running out of memory or error writing to disk. Function does not fail if errors were detected on the disk.
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.0 and later.
Header: Scandisk.h.
Link Library: Fatutil.dll.
See Also
CreateFile | DeviceIoControl | DISK_INFO | SCAN_OPTIONS
Send Feedback on this topic to the authors