IOCTL_DISK_SET_DISK_ATTRIBUTES IOCTL (winioctl.h)

Sets the attributes of the specified disk device.

To perform this operation, call the DeviceIoControl function with the following parameters.

BOOL DeviceIoControl(
  (HANDLE) hDevice,                 // handle to device
  IOCTL_DISK_SET_DISK_ATTRIBUTES,   // dwIoControlCode
  (LPVOID) lpInBuffer,              // input buffer: SET_DISK_ATTRIBUTES
  (DWORD) nInBufferSize,            // size of input buffer
  NULL,                             // lpOutBuffer
  0,                                // nOutBufferSize
  (LPDWORD) lpBytesReturned,        // number of bytes returned
  (LPOVERLAPPED) lpOverlapped       // OVERLAPPED structure
);

Requirements

Requirement Value
Minimum supported client Windows 7 [desktop apps only]
Minimum supported server Windows Server 2008 R2 [desktop apps only]
Header winioctl.h (include Windows.h)

See also