Compartilhar via


FSCTL_SET_EXTENDED_FLAGS (Compact 2013)

3/26/2014

This I/O control sets the extended flags on a file.

Syntax

BOOL DeviceIoControl(
    HANDLE hDevice,           // handle to device
    DWORD dwIoControlCode,    // use FSCTL_SET_EXTENDED_FLAGS
    LPVOID lpInBuffer,        // pointer to input buffer
    DWORD nInBufferSize,      // input buffer size
    LPVOID lpOutBuffer,       // pointer to output buffer
    DWORD nOutBufferSize,     // output buffer size
    LPDWORD lpBytesReturned,  // number of bytes returned
    OVERLAPPED lpOverlapped   // pointer to OVERLAPPED structure
);

Parameters

  • hDevice
    [in] Handle to the file or alternate stream on which to set the extended flags. To retrieve a device handle, call the CreateFile function.
  • dwIoControlCode
    [in] Set to FSCTL_SET_EXTENDED_FLAGS.
  • lpInBuf
    [in] Pointer to a DWORD that contains the flag to set. See the Remarks section for a description of the flags.
  • nInBufSize
    [in] Set to sizeof(DWORD).
  • lpOutBuf
    Not used.
  • nOutBufSize
    Not used.
  • lpBytesReturned
    Not used.
  • 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.

Remarks

The lpInBuf contains one or both of the following flags.

Flag

Description

CE_FILE_FLAG_TRANS_DATA

Write operations to this file are transaction-safe.

CE_FILE_FLAG_DISABLE_WRITE_TIME

Disable updating the write timestamp of the file after a write.

Requirements

Header

fsioctl.h

See Also

Reference

FS I/O Controls
CreateFile

Other Resources

DeviceIoControl