EVT_WDF_WMI_PROVIDER_FUNCTION_CONTROL callback function (wdfwmi.h)

[Applies to KMDF only]

A driver's EvtWmiProviderFunctionControl callback function enables and disables the driver's support for collecting data and sending events for a specified WMI data provider.

Syntax

EVT_WDF_WMI_PROVIDER_FUNCTION_CONTROL EvtWdfWmiProviderFunctionControl;

NTSTATUS EvtWdfWmiProviderFunctionControl(
  [in] WDFWMIPROVIDER WmiProvider,
  [in] WDF_WMI_PROVIDER_CONTROL Control,
  [in] BOOLEAN Enable
)
{...}

Parameters

[in] WmiProvider

A handle to a WMI provider object.

[in] Control

A WDF_WMI_PROVIDER_CONTROL-typed value that identifies a capability that the driver must enable or disable.

[in] Enable

A Boolean value that, if TRUE, indicates that the driver must enable the capability that Control specifies. If FALSE, the driver must disable the capability.

Return value

The EvtWmiProviderFunctionControl callback function must return STATUS_SUCCESS if the operation succeeds. Otherwise, it must return a status value for which NT_SUCCESS(status) equals FALSE.

Remarks

To register an EvtWmiProviderFunctionControl callback function, your driver must place the function's address in a WDF_WMI_PROVIDER_CONFIG structure before it calls WdfWmiProviderCreate.

If your driver sets the WdfWmiProviderExpensive flag in the Flags member of a WMI data provider's WDF_WMI_PROVIDER_CONFIG structure, and if the driver provides an EvtWmiProviderFunctionControl callback function, the framework calls the callback function when the driver should enable or disable its ability to collect WMI data.

Instead of providing an EvtWmiProviderFunctionControl callback function, the driver can call WdfWmiProviderIsEnabled to find out if it should enable or disable collecting data.

For more information about the EvtWmiProviderFunctionControl callback function, see Supporting WMI in Framework-Based Drivers.

Requirements

Requirement Value
Target Platform Universal
Minimum KMDF version 1.0
Header wdfwmi.h (include Wdf.h)
IRQL PASSIVE_LEVEL

See also

EvtWmiInstanceExecuteMethod

EvtWmiInstanceQueryInstance

EvtWmiInstanceSetInstance

EvtWmiInstanceSetItem

WDF_WMI_PROVIDER_CONFIG

WDF_WMI_PROVIDER_CONTROL

WdfWmiProviderCreate

WdfWmiProviderIsEnabled