Επεξεργασία

Κοινή χρήση μέσω


IWbemEventSink interface

The IWbemEventSink interface initiates communication with an event provider using a restricted set of queries. This interface extends IWbemObjectSink, providing new methods dealing with security and performance. For more information about using this interface, see Writing an Event Provider and Securing WMI Events.

Members

The IWbemEventSink interface has these types of members:

Methods

The IWbemEventSink interface has these methods.

Method Description
GetRestrictedSink Called by the consumer to set up restricted event queries.
IsActive Checks status of event sink.
SetBatchingParameters Called by the consumer to set batching parameters.
SetSinkSecurity Used to update the security descriptor on an event sink.

Remarks

When implementing an event subscription sink (IWbemObjectSink or IWbemEventSink), do not call into WMI from within the methods on the sink object. For example, calling IWbemServices::CancelAsyncCall to cancel the sink from within an implementation of IWbemEventSink::SetSinkSecurity can interfere with the WMI state. To cancel an event subscription, set a flag and call IWbemServices::CancelAsyncCall from another thread or object. For implementations that are not related to an event sink, such as object, enum, and query retrievals, you can call back into WMI.

Sink implementations should process the event notification within 100 MSEC because the WMI thread that delivers the event notification cannot do other work until the sink object has completed processing. If the notification requires a large amount of processing, the sink can use an internal queue for another thread to handle the processing.

Requirements

Requirement Value
Minimum supported client
Windows Vista
Minimum supported server
Windows Server 2008
Header
Wbemprov.h (include Wbemidl.h)
Library
Wbemuuid.lib
DLL
Wbemsvc.dll

See also

COM API for WMI