다음을 통해 공유


IOCTL_DISK_SCAN_VOLUME (Windows CE 5.0)

Send Feedback

This input/output control scans a disk volume for errors.

Parameters

  • dwIoControlCode
    [in] Set to IOCTL_DISK_SCAN_VOLUME.
  • lpInBuf
    [in] Set to NULL.
  • nInBuf
    [in] Set to 0.
  • lpOutBuf
    [out] Set to NULL.
  • nOutBufSize
    [out] Set to 0.
  • lpBytesReturned
    [out] DWORD pointer to receive the size of data returned in nOutBufSize.
  • lpOverlapped
    Not used.

Return Values

If returns TRUE, then the input/output control was successfully processed; otherwise, returns FALSE.

Remarks

To scan a volume

  1. Open a handle to the volume.

    The name of the volume to open has the format \FolderName\Vol:, where FolderName is the name that FATFS uses for the root directory name of the mounted volume.

  2. Call DeviceIoControl with the volume handle and IOCTL_DISK_SCAN_VOLUME.

    This following code example shows this procedure.

    hVolume = CreateFile(TEXT("\Storage Card\Vol:"), 
    GENERIC_READ|GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL); 
    DeviceIoControl(hVolume, IOCTL_DISK_SCAN_VOLUME, NULL, 0, NULL, 
    0, lpBytesReturned, NULL);
    

Requirements

OS Versions: Windows CE 2.12 and later.

Header: Diskio.h.

See Also

DeviceIoControl

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.