Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

IWbemEventProvider::ProvideEvents method

Windows Management calls the IWbemEventProvider::ProvideEvents method to signal an event provider to begin delivery of its events.


HRESULT ProvideEvents(
  [in] IWbemObjectSink *pSink,
  [inlong            lFlags


pSink [in]

Pointer to the object sink to which the provider will deliver its events. In an event provider implementation, you should use the IWbemObjectSink::Indicate method to send events through pSink. This is in contrast to other providers that may use the SetStatus method: The ProvideEvents method should use only Indicate to update a sink.

lFlags [in]

Reserved. This parameter must be 0.

Return value

This method returns an HRESULT indicating the status of the method call. The following table lists the value contained within an HRESULT.

Return codeDescription

The provider failed internally, and it cannot accept future requests.


The provider received the sink, and it will begin delivery of events.



Windows Management calls this method to activate the provider. Windows Management gives an IWbemObjectSink pointer to the event provider. The provider must call the AddRef method using this pointer to increment the reference count, and then return from the call.

Typically, the provider will create an independent thread, and deliver the events as they occur to the provided sink interface.

The provider is not permitted to block this call for more than a few seconds, but it must return as quickly as possible to Windows Management.


Minimum supported client

Windows Vista

Minimum supported server

Windows Server 2003


Wbemprov.h (include Wbemidl.h)







© 2015 Microsoft