WdfDeviceAssignProperty function

[Applies to KMDF and UMDF]

The WdfDeviceAssignProperty method modifies the current setting of a device property.

Syntax

NTSTATUS WdfDeviceAssignProperty(
  WDFDEVICE                 Device,
  PWDF_DEVICE_PROPERTY_DATA DeviceProperty,
  DEVPROPTYPE               Type,
  ULONG                     Size,
  PVOID                     Data
);

Parameters

Device

A handle to a framework device object.

DeviceProperty

A pointer to a WDF_DEVICE_PROPERTY_DATA structure that identifies the device property to modify.

Type

A DEVPROPTYPE-typed variable that specifies the type of the data stored in Data.

Size

The size, in bytes, of the buffer that is pointed to by Data.

Data

A pointer to a caller-allocated buffer that contains the device property data. Set this parameter to NULL to delete the specified property.

Return Value

If the operation succeeds, WdfDeviceAssignProperty returns STATUS_SUCCESS. Additional return values include:

Return code Description
STATUS_INVALID_PARAMETER
One of the parameters is incorrect.
 

The method might return other NTSTATUS values.

A bug check occurs if the driver supplies an invalid object handle.

Remarks

You can use WdfDeviceAssignProperty to modify the setting of any property that is exposed through the unified property model.

For information about related methods, see Accessing the Unified Device Property Model.

Requirements

   
Target Platform Universal
Minimum KMDF version 1.13
Minimum UMDF version 2.0
Header wdfdevice.h (include Wdf.h)
Library Wdf01000.sys (KMDF); WUDFx02000.dll (UMDF)
IRQL APC_LEVEL

See Also

WdfDeviceAssignInterfaceProperty