Interface IWbemUnboundObjectSink¦@¦
<span style=color:#FF0000>[This is preliminary documentation and subject to change.]</span>
The IWbemUnboundObjectSink interface is implemented by all logical event consumers. It is a simple sink interface that accepts delivery of event objects.
Methods in Vtable Order
Iunknown Methods | Properties |
QueryInterface_hmm_IWbemUnboundObjectSink_QueryInterface_b | Determines if the current object supports a given interface. |
AddRef_hmm_IWbemUnboundObjectSink_AddRef | Increases the object's reference count by 1. |
Release_hmm_IWbemUnboundObjectSink_Release | Decrements the object's reference count, and frees the object when the reference count is zero. |
IWbemUnboundObjectSink Methods | Properties |
IndicateToConsumer_hmm_IWbemUnboundObjectSink_IndicateToConsumer | This is called by CIMOM to actually deliver events to a consumer. |
^# $ K + IWbemUnboundObjectSink::QueryInterface¦@¦
<span style=color:#FF0000>[This is preliminary documentation and subject to change.]</span>
The IWbemUnboundObjectSink::QueryInterface method determines if the object supports a particular COM interface. If it does, the system increases the object's reference count, and the application can use that interface immediately.
HRESULT IWbemUnboundObjectSink::QueryInterface(
[in] REFIID riid,
[out] LPVOID *ppv
);
Parameters
riid
The COM interface identifier of the requested interface.
obp
Address of a pointer that will be filled with the interface pointer if the query succeeds.
Return Values
Returns standard COM error codes for QueryInterface. It returns WBEM_S_NO_ERROR if the call succeeds. If the call fails because the requested interface was not supported, the method returns E_NOINTERFACE.
Remarks
When the application no longer needs the interface retrieved by a call to this method, it must call the Release method for that interface to free it. The QueryInterface method allows the extension of objects without interfering with each object's existing or future functionality.
This method is part of the IUnknown interface inherited by the object. For more information about this method, see the COM documentation in the Microsoft Platform SDK.
See Also
IUnknown Interface Basics_hmm_IUnknown_Interface_Basics
^# $ K + IWbemUnboundObjectSink::AddRef¦@¦
<span style=color:#FF0000>[This is preliminary documentation and subject to change.]</span>
The IWbemUnboundObjectSink::AddRef method increases the object's reference count by 1.
ULONG AddRef( );
Parameters
None.
Return Values
Returns the new reference count.
Remarks
When the object is created, its reference count is set to 1. Every time an application obtains an interface to the object or calls the AddRef method, the object's reference count is increased by 1. Use the Release_hmm_IWbemUnboundObjectSink_Release method to decrease the object's reference count by 1.
This method is part of the IUnknown interface inherited by the object. For a complete discussion of IUnknown methods, see IUnknown Programming Basics.
For more information about this method, see the COM documentation in the Microsoft Platform SDK.
See Also
IUnknown Interface Basics_hmm_IUnknown_Interface_Basics
^# $ K + IWbemUnboundObjectSink::Release¦@¦
<span style=color:#FF0000>[This is preliminary documentation and subject to change.]</span>
The IWbemUnboundObjectSink::Release method decreases the object's reference count by 1.
ULONG IWbemUnboundObjectSink::Release( );
Parameters
None.
Return Values
Returns the new reference count.
Remarks
The object deallocates itself when its reference count reaches zero. Use the AddRef_hmm_IWbemUnboundObjectSink_AddRef method to increase the object's reference count by 1.
This method is part of the IUnknown interface inherited by the object. For more information about this method, see the COM documentation in the Microsoft Platform SDK.
See Also
IUnknown Interface Basics_hmm_IUnknown_Interface_Basics
^# $ K + IWbemUnboundObjectSink::IndicateToConsumer¦@¦
<span style=color:#FF0000>[This is preliminary documentation and subject to change.]</span>
This is called by CIMOM to actually deliver events to a consumer.
HRESULT IWbemUnboundObjectSink::IndicateToConsumer(
[in] IWbemClassObject *pLogicalConsumer,
[in] LONG lNumObjects,
[in, size_is(lNumObjects)] IWbemClassObject **apObjects
);
Parameters
pLogicalConsumer
A pointer to the logical consumer object for which this set of objects is delivered.
lNumObjects
The number of objects delivered in the array that follows.
apObjects
A pointer to an array of IWbemClassObject instances which represent the events delivered.
Return Values
WBEM_S_NO_ERROR. The implementation should always return this.
Remarks
CIMOM typically obtains the IWbemUnboundObjectSink pointer from a event consumer provider which implements the IWbemEventConsumerProvider interface. That interface is called by CIMOM to obtain the IWbemUnboundObjectSink pointer for a particular logical consumer.
Then, CIMOM calls IndicateToConsumer to deliver the actual event objects.
See Also
IWbemEventConsumerProvider, Constructing Event Consumers