WdfWmiProviderIsEnabled function (wdfwmi.h)

[Applies to KMDF only]

The WdfWmiProviderIsEnabled method determines if either data collection or event notification is enabled for a specified WMI data provider.

Syntax

BOOLEAN WdfWmiProviderIsEnabled(
  [in] WDFWMIPROVIDER           WmiProvider,
  [in] WDF_WMI_PROVIDER_CONTROL ProviderControl
);

Parameters

[in] WmiProvider

A handle to a WMI provider object that the driver obtained by calling WdfWmiProviderCreate or WdfWmiInstanceGetProvider.

[in] ProviderControl

A WDF_WMI_PROVIDER_CONTROL-typed value that specifies one of the types of control functions (data collection or event notification) that a WMI data provider can support.

Return value

WdfWmiProviderIsEnabled returns TRUE if the capability that the ProviderControl parameter specifies is enabled and FALSE otherwise.

A bug check occurs if the driver supplies an invalid object handle.

Remarks

A driver that does not provide an EvtWmiProviderFunctionControl callback function can call WdfWmiProviderIsEnabled to determine if data collection or event notification is enabled.

Examples

The following code example determines if event notification is enabled for a specified WMI data provider.

BOOLEAN eventNotifEnabled;

eventNotifEnabled = WdfWmiProviderIsEnabled(
                                            wmiProvider,
                                            WdfWmiEventControl
                                            );

Requirements

Requirement Value
Target Platform Universal
Minimum KMDF version 1.0
Header wdfwmi.h (include Wdf.h)
Library Wdf01000.sys (see Framework Library Versioning.)
IRQL <=DISPATCH_LEVEL
DDI compliance rules DriverCreate(kmdf), KmdfIrql(kmdf), KmdfIrql2(kmdf), KmdfIrqlExplicit(kmdf)

See also

EvtWmiProviderFunctionControl

WDF_WMI_PROVIDER_CONTROL

WdfWmiInstanceGetProvider

WdfWmiProviderCreate