Microsoft COM IUnknown interface. Included here for completeness, with arguments given as equivalent DMA types.
This method must be supported in every implementation of this interface.
Syntax
DmaUInteger32 IUnknown::AddRef ( )
Called when another component object is using the interface. Increases the object's reference count by one and returns the number of references to the object. As long as the reference count is non-zero, the object must remain in memory.
Return Values
Name | Description |
This method must be supported in every implementation of this interface.
Syntax
DmaRC IUnknown::QueryInterface (
DMA_REFIID riid,
pDmapv ppIObject)
Parameters
Name | Mode | Description |
riid | input | Interface Identifier for the desired interface. |
ppIObject | output | Location for the returned interface pointer. |
This method requests an interface pointer from a COM object. If the interface is supported by the object, this method returns DMARC_OK and places the interface pointer in the location indicated by ppIObject. If the interface is not supported, the error code DMARC_BAD_INTERFACE is returned.
This is the mechanism in COM that allows clients to dynamically discover (at run time) whether or not an interface is supported by a component object.
If an error occurs, NULL is returned as the new interface pointer.
Return Values
Name | Description |
DMARC_BAD_INTERFACE | (E_NOINTERFACE) The requested interface is not supported by this object. |
DMARC_OK | (S_OK) Success. |
DMARC_UNEXPECTED | (E_UNEXPECTED) An unexpected error occurred. |
This method must be supported in every implementation of this interface.
Syntax
DmaUInteger32 IUnknown::Release ( )
Called when the client no longer requires use of the interface. Decrements the reference count and returns the number of references to the object. This method is used to free interface pointers returned to the client interface. When all interface pointers to an object are released, it will be deleted.
This method must not be used for freeing references to other datatypes (e.g., DMAString or Binary buffers).
Return Values
Name | Description |