Partager via


IOCTL_DISK_SCAN_VOLUME (Windows Embedded CE 6.0)

1/6/2010

This I/O 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 zero.
  • lpOutBuf
    [out] Set to NULL.
  • nOutBufSize
    [out] Set to zero.
  • lpBytesReturned
    [out] DWORD pointer to receive the size of data returned in nOutBufSize.
  • lpOverlapped
    Not used.

Return Values

TRUE indicates success. FALSE indicates failure.

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 FAT file system name for the root directory of the mounted volume.

  2. Call DeviceIoControl with the volume handle and this I/O control.

    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

Header diskio.h
Windows Embedded CE Windows CE 2.12 and later

See Also

Concepts

FAT File System I/O Controls

Other Resources

DeviceIoControl