IoSetDeviceInterfacePropertyData function (wdm.h)

The IoSetDeviceInterfacePropertyData routine modifies the current value of a device interface property.

Syntax

NTSTATUS IoSetDeviceInterfacePropertyData(
  [in]           PUNICODE_STRING  SymbolicLinkName,
  [in]           const DEVPROPKEY *PropertyKey,
  [in]           LCID             Lcid,
  [in]           ULONG            Flags,
  [in]           DEVPROPTYPE      Type,
  [in]           ULONG            Size,
  [in, optional] PVOID            Data
);

Parameters

[in] SymbolicLinkName

A pointer to a string that identifies the device interface instance. This string was obtained from a previous call to the IoGetDeviceInterfaces, IoGetDeviceInterfaceAlias, or IoRegisterDeviceInterface routine.

[in] PropertyKey

A pointer to a DEVPROPKEY structure that contains the device interface property key.

[in] Lcid

Specifies 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.

[in] Flags

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.

[in] Type

Set this parameter to the DEVPROPTYPE value that specifies the type of the data that is supplied in the Data buffer.

[in] Size

Specifies the size, in bytes, of the buffer that Data points to.

[in, optional] Data

A pointer to the device interface 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

IoSetDeviceInterfacePropertyData returns STATUS_SUCCESS if the call was successful. Possible error return values include the following status codes.

Return code Description
STATUS_UNSUCCESSFUL The specified LCID value is not valid.
STATUS_NOT_IMPLEMENTED The specified property is not supported.

Remarks

Kernel-mode drivers use the IoSetDeviceInterfacePropertyData routine to modify device interface properties that are defined as part of the unified device property model. For more information about device interface properties, see Device Properties.

Drivers can use the IoGetDeviceInterfacePropertyData routine to obtain the current value for a device interface property.

Callers of IoSetDeviceInterfacePropertyData must be running at IRQL <= APC_LEVEL in the context of a system thread.

Requirements

Requirement Value
Minimum supported client Available for Windows 8 and later versions of Windows.
Target Platform Universal
Header wdm.h (include Wdm.h, Ntddk.h, Ntifs.h)
Library NtosKrnl.lib
DLL NtosKrnl.exe
IRQL <= APC_LEVEL

See also

DEVPROPKEY

DEVPROPTYPE

IoGetDeviceInterfacePropertyData