Bewerken

Delen via


Property Value Requirements

Windows enforces the device property value size requirements that are listed in the following table. Windows only sets a device property value if the device property value complies with these value size requirements.

Property data type Property value size requirement

A fixed-length base-data-type value

The specified size of the supplied data must be the number of bytes in the base data type.

An array of a fixed-length base-data-type values

The specified size of the supplied data must be the number of bytes of an array of zero or more base-data-type values.

A DEVPROP_TYPE_SECURITY_DESCRIPTOR data type value

The specified size of the supplied data must be the number of bytes of a variable-length, self-relative SECURITY_DESCRIPTOR structure.

A DEVPROP_TYPE_STRING data type value, a DEVPROP_TYPE_SECURITY_DESCRIPTOR_STRING data type value, or a DEVPROP_TYPE_STRING_INDIRECT data type value

The specified size of the supplied data must be the number of bytes of a Unicode REG_SZ string, including the NULL-terminator.

A list of DEVPROP_TYPE_STRING-typed strings, a list of DEVPROP_TYPE_SECURITY_DESCRIPTOR_STRING-typed strings, or a DEVPROP_TYPE_STRING_LIST data type value

The specified size of the supplied data must be the number of bytes of a Unicode REG_MULTLI_SZ list of strings, including the final NULL-terminator that terminates the list of strings.

All property values

In addition to the property value size requirements that are listed in the other rows of this table, the maximum size, in bytes, of a property value is UNICODE_STRING_MAX_BYTES.