The IoSetDevicePropertyData routine modifies the current setting for a device property.
NTSTATUS IoSetDevicePropertyData( _In_ PDEVICE_OBJECT Pdo, _In_ const DEVPROPKEY *PropertyKey, _In_ LCID Lcid, _In_ ULONG Flags, _In_ DEVPROPTYPE Type, _In_ ULONG Size, _In_opt_ PVOID Data );
- Pdo [in]
A pointer to the physical device object (PDO) for the device that is being queried.
- PropertyKey [in]
A pointer to a DEVPROPKEY structure that specifies the device property key.
- Lcid [in]
A locale identifier. Set this parameter either to a language-specific LCID value or to LOCALE_NEUTRAL.
The LOCALE_NEUTRAL LCID specifies that the property is language-neutral (that is, not specific to any language).
Do not set this parameter to LOCALE_SYSTEM_DEFAULT or LOCALE_USER_DEFAULT.
For more information about language-specific LCID values, see LCID Structure.
- Flags [in]
Set this parameter to PLUGPLAY_PROPERTY_PERSISTENT if the property value set by this routine should persist across computer restarts. Otherwise, set Flags to zero.
Windows 8 and Windows Server 2012 and later operating systems treat Flags as if PLUGPLAY_PROPERTY_PERSISTENT is always passed.
- Type [in]
A DEVPROPTYPE value that specifies the type of the data that is provided in the Data buffer.
- Size [in]
The size, in bytes, of the buffer that Data points to.
- Data [in, optional]
A pointer to the device property data. Set this parameter to NULL to delete the specified property. If Data is non-NULL, the routine stores an internal copy of the property value. The buffer pointed to by Data does not need to remain valid after the call returns.
IoSetDevicePropertyData returns STATUS_SUCCESS if the call was successful, or the appropriate NTSTATUS code on failure.
Kernel-mode drivers use the IoSetDevicePropertyData routine to modify device properties that are defined as part of the unified device property model. For more information about device properties, see Device Properties.
To delete a property for a specific locale, pass a language-specific LCID value in Lcid and NULL in Data.
To delete a property for all locales, pass LOCALE_NEUTRAL in Lcid and NULL in Data.
To modify a property for a specific locale, pass a language-specific LCID value in Lcid and non-NULL in Data.
To modify a property for all locales, pass LOCALE_NEUTRAL in Lcid and non-NULL in Data.
Beginning with Windows 8 and Windows Server 2012 passing LOCALE_NEUTRAL in Lcid is treated like any other locale.
Drivers can use the IoGetDevicePropertyData routine to obtain the current value for a device property.
Callers of IoSetDeviceProperty must be running at IRQL <= APC_LEVEL in the context of a system thread.
|Available starting with Windows Vista.|
DDI compliance rules
Build date: 11/16/2013