WdfWmiProviderIsEnabled - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
// wdfwmi.h

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

View the official Windows Driver Kit DDI reference

NtDoc

No description available.

Windows Driver Kit DDI reference (nf-wdfwmi-wdfwmiproviderisenabled)

WdfWmiProviderIsEnabled function

Description

[Applies to KMDF only]

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

Parameters

WmiProvider [in]

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

ProviderControl [in]

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
                                            );

See also

EvtWmiProviderFunctionControl

WDF_WMI_PROVIDER_CONTROL

WdfWmiInstanceGetProvider

WdfWmiProviderCreate