SET_DISK_ATTRIBUTES structure (winioctl.h)

Specifies the attributes to be set on a disk device. Passed as the input buffer to the IOCTL_DISK_SET_DISK_ATTRIBUTES control code.

Syntax

typedef struct _SET_DISK_ATTRIBUTES {
  DWORD     Version;
  BOOLEAN   Persist;
  BYTE      Reserved1[3];
  DWORDLONG Attributes;
  DWORDLONG AttributesMask;
  DWORD     Reserved2[4];
} SET_DISK_ATTRIBUTES, *PSET_DISK_ATTRIBUTES;

Members

Version

Set to sizeof(GET_DISK_ATTRIBUTES).

Persist

If TRUE, these settings are persisted across reboots.

Reserved1[3]

Reserved. Must be set to FALSE (0).

Attributes

Specifies attributes.

Value Meaning
DISK_ATTRIBUTE_OFFLINE
0x0000000000000001
The disk is offline.
DISK_ATTRIBUTE_READ_ONLY
0x0000000000000002
The disk is read-only.

AttributesMask

Indicates which attributes are being changed.

Value Meaning
DISK_ATTRIBUTE_OFFLINE
0x0000000000000001
The offline attribute is being changed.
DISK_ATTRIBUTE_READ_ONLY
0x0000000000000002
The read-only attribute is being changed.

Reserved2[4]

Reserved. Must be set to 0.

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

Disk Management Structures

GET_DISK_ATTRIBUTES

IOCTL_DISK_SET_DISK_ATTRIBUTES