Bewerken

Delen via


WDF_OBJECT_ATTRIBUTES_SET_CONTEXT_TYPE macro

[Applies to KMDF and UMDF]

The WDF_OBJECT_ATTRIBUTES_SET_CONTEXT_TYPE macro inserts an object's driver-defined context information into the object's WDF_OBJECT_ATTRIBUTES structure.

Syntax

void WDF_OBJECT_ATTRIBUTES_SET_CONTEXT_TYPE(
    _attributes,
    _contexttype
);

Parameters

_attributes
A pointer to an object's WDF_OBJECT_ATTRIBUTES structure.

_contexttype
The structure type name of a driver-defined structure that describes the contents of an object's context space.

Return value

This macro does not return a value.

Remarks

You should use the WDF_OBJECT_ATTRIBUTES_SET_CONTEXT_TYPE macro after calling WDF_OBJECT_ATTRIBUTES_INIT.

For more information about using the WDF_OBJECT_ATTRIBUTES_SET_CONTEXT_TYPE macro, see Framework Object Context Space.

For a code example that uses this macro, see WDF_DECLARE_CONTEXT_TYPE.

Requirements

Target platform

Universal

Minimum KMDF version

1.0

Minimum UMDF version

2.0

Header

Wdfobject.h (include Wdf.h)

See also

WDF_DECLARE_CONTEXT_TYPE

WDF_OBJECT_ATTRIBUTES

WDF_OBJECT_ATTRIBUTES_INIT

WDF_OBJECT_ATTRIBUTES_INIT_CONTEXT_TYPE