WdfDeviceAssignProperty method

[Applies to KMDF and UMDF]

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

Syntax


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

Parameters

Device [in]

A handle to a framework device object.

DeviceProperty [in]

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

Type [in]

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

Size [in]

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

Data [in, optional]

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 codeDescription
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

 

 

Send comments about this topic to Microsoft

Show: