WdfWmiProviderIsEnabled method

[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

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

Requirements

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, KmdfIrql, KmdfIrql2

See also

EvtWmiProviderFunctionControl
WDF_WMI_PROVIDER_CONTROL
WdfWmiInstanceGetProvider
WdfWmiProviderCreate

 

 

Send comments about this topic to Microsoft

Show: