Compartilhar via


FSCTL_SET_ZERO_DATA

A version of this page is also available for

Windows Embedded CE 6.0 R3

4/8/2010

This I/O control fills a specified range of a file with zeros.

Parameters

  • hDevice
    [in] Handle to the file or alternate stream to which the data is written. To obtain a handle, call the CreateFile function.
  • dwIoControlCode
    [in] Set to FSCTL_SET_ZERO_DATA.
  • lpInBuf
    [in] Pointer to a FILE_ZERO_DATA_INFORMATION structure that specifies the range of the file to set to zero. The FileOffset member of the structure is the byte offset of the first byte to set to zero, and the BeyondFinalZero member is the byte offset of the first byte beyond the last byte set to zero.
  • nInBufSize
    [in] Size of the input buffer, in bytes.
  • lpOutBuf
    Not used. Set to NULL.
  • nOutBufSize
    Not used. Set to NULL.
  • lpBytesReturned
    [out] Pointer to a variable that receives the size of the data stored in the output buffer, in bytes.
  • lpOverlapped
    Not used.

Return Values

If the operation succeeds, the DeviceIoControl** function returns a nonzero value.**

If the operation fails, DeviceIoControl returns zero. For extended error information, call GetLastError.

Requirements

Header fsioctl.h
Windows Embedded CE Windows CE 5.0 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also

Reference

FS I/O Controls
CreateFile
FILE_ZERO_DATA_INFORMATION

Other Resources

DeviceIoControl