IoSetDevicePropertyData routine
The IoSetDevicePropertyData routine modifies the current setting for a device property.
Syntax
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
);
Parameters
- 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.
- 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.
Return value
IoSetDevicePropertyData returns STATUS_SUCCESS if the call was successful, or the appropriate NTSTATUS code on failure.
Remarks
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.
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.
Requirements
|
Version | Available starting with Windows Vista. |
|---|---|
|
Header |
|
|
Library |
|
|
IRQL | <= APC_LEVEL |
|
DDI compliance rules | PowerIrpDDis, HwStorPortProhibitedDDIs |
See also
Send comments about this topic to Microsoft
Build date: 5/22/2013