WDF_WMI_INSTANCE_CONFIG structure (wdfwmi.h)

[Applies to KMDF only]

The WDF_WMI_INSTANCE_CONFIG structure contains configuration information for an instance of a WMI data provider.

Syntax

typedef struct _WDF_WMI_INSTANCE_CONFIG {
  ULONG                               Size;
  WDFWMIPROVIDER                      Provider;
  PWDF_WMI_PROVIDER_CONFIG            ProviderConfig;
  BOOLEAN                             UseContextForQuery;
  BOOLEAN                             Register;
  PFN_WDF_WMI_INSTANCE_QUERY_INSTANCE EvtWmiInstanceQueryInstance;
  PFN_WDF_WMI_INSTANCE_SET_INSTANCE   EvtWmiInstanceSetInstance;
  PFN_WDF_WMI_INSTANCE_SET_ITEM       EvtWmiInstanceSetItem;
  PFN_WDF_WMI_INSTANCE_EXECUTE_METHOD EvtWmiInstanceExecuteMethod;
} WDF_WMI_INSTANCE_CONFIG, *PWDF_WMI_INSTANCE_CONFIG;

Members

Size

The size, in bytes, of this structure.

Provider

A handle to a WMI provider object that a driver obtained by calling WdfWmiProviderCreate. If this member is NULL, the ProviderConfig member must not be NULL.

ProviderConfig

A pointer to a WDF_WMI_PROVIDER_CONFIG structure. If this member is NULL, the Provider member must not be NULL.

UseContextForQuery

A Boolean value that, if TRUE, indicates that the driver will store instance data in the WMI instance object's context space and will not provide an EvtWmiInstanceQueryInstance callback function. Instead, the framework will service a WMI client's request for instance data by sending the contents of the context space to WMI. If this member is FALSE, the driver must provide an EvtWmiInstanceQueryInstance callback function (unless the instance data is write-only).

If UseContextForQuery is TRUE, the instance data must be read-only and therefore the driver cannot provide EvtWmiInstanceSetInstance or EvtWmiInstanceSetItem callback functions.

Register

A Boolean value that, if TRUE, indicates that the framework will register the provider instance with the system's WMI service after it creates a WMI instance object. If this member is FALSE, the driver must call WdfWmiInstanceRegister to register the provider instance.

EvtWmiInstanceQueryInstance

A pointer to the driver's EvtWmiInstanceQueryInstance callback function for the provider instance, or NULL.

EvtWmiInstanceSetInstance

A pointer to the driver's EvtWmiInstanceSetInstance callback function for the provider instance, or NULL.

EvtWmiInstanceSetItem

A pointer to the driver's EvtWmiInstanceSetItem callback function for the provider instance, or NULL.

EvtWmiInstanceExecuteMethod

A pointer to the driver's EvtWmiInstanceExecuteMethod callback function for the provider instance, or NULL.

Remarks

The WDF_WMI_INSTANCE_CONFIG structure is used as input to the WdfWmiInstanceCreate method.

To initialize a WDF_WMI_INSTANCE_CONFIG structure, your driver should call WDF_WMI_INSTANCE_CONFIG_INIT_PROVIDER or WDF_WMI_INSTANCE_CONFIG_INIT_PROVIDER_CONFIG.

Requirements

Requirement Value
Minimum KMDF version 1.0
Header wdfwmi.h (include Wdf.h)

See also

EvtWmiInstanceExecuteMethod

EvtWmiInstanceQueryInstance

EvtWmiInstanceSetInstance

EvtWmiInstanceSetItem

WDF_WMI_INSTANCE_CONFIG_INIT_PROVIDER

WDF_WMI_INSTANCE_CONFIG_INIT_PROVIDER_CONFIG

WDF_WMI_PROVIDER_CONFIG

WdfWmiInstanceCreate

WdfWmiInstanceRegister

WdfWmiProviderCreate