WDF_OBJECT_CONTEXT_TYPE_INFO structure

[Applies to KMDF and UMDF]

The WDF_OBJECT_CONTEXT_TYPE_INFO structure describes a framework object's driver-defined context memory.

Syntax

typedef struct _WDF_OBJECT_CONTEXT_TYPE_INFO {
  ULONG                          Size;
  LPCSTR                         ContextName;
  size_t                         ContextSize;
  PCWDF_OBJECT_CONTEXT_TYPE_INFO UniqueType;
  PFN_GET_UNIQUE_CONTEXT_TYPE    EvtDriverGetUniqueContextType;
} WDF_OBJECT_CONTEXT_TYPE_INFO, *PWDF_OBJECT_CONTEXT_TYPE_INFO;

Members

Size

The size, in bytes, of this structure.

ContextName

A quoted string that represents the name of a driver-defined structure that contains an object's context information.

ContextSize

The size, in bytes, of the structure that the ContextName member specifies. The framework allocates space for this structure when it creates an object. If the ContextSizeOverride member of the WDF_OBJECT_ATTRIBUTES structure is nonzero, its value overrides the value in the ContextSize member.

UniqueType

For internal use.

EvtDriverGetUniqueContextType

For internal use.

Remarks

For each object instance, the framework allocates context memory with a size that is based on the value of the ContextSize member or the value of the ContextSizeOverride member of the WDF_OBJECT_ATTRIBUTES structure.

To create and initialize a WDF_OBJECT_CONTEXT_TYPE_INFO structure, drivers should use either the WDF_DECLARE_CONTEXT_TYPE macro or the WDF_DECLARE_CONTEXT_TYPE_WITH_NAME macro.

To insert a pointer to this structure into a WDF_OBJECT_ATTRIBUTES structure, drivers should use the WDF_OBJECT_ATTRIBUTES_SET_CONTEXT_TYPE macro.

For more information about using these macros, see Framework Object Context Space.

Requirements

   
Minimum KMDF version 1.0
Minimum UMDF version 2.0
Header wdfobject.h (include Wdf.h)

See Also

WDF_DECLARE_CONTEXT_TYPE

WDF_DECLARE_CONTEXT_TYPE_WITH_NAME

WDF_OBJECT_ATTRIBUTES

WDF_OBJECT_ATTRIBUTES_SET_CONTEXT_TYPE