struct CCL::IUnknown
Overview
Basic interface to manage object lifetime and to obtain other interface pointers. More…
#include <iunknown.h> struct IUnknown { // methods virtual tresult CCL_API queryInterface (UIDRef iid, void** ptr) = 0; virtual unsigned int CCL_API retain () = 0; virtual unsigned int CCL_API release () = 0; };
Detailed Documentation
Basic interface to manage object lifetime and to obtain other interface pointers.
The vtable is binary equivalent to IUnknown of COM.
Methods
virtual tresult CCL_API queryInterface (UIDRef iid, void** ptr) = 0
Obtain pointer to another interface supported by this object.
In case of success, the caller holds a reference to this interface, which must be released afterwards.
Parameters:
iid |
ID of requested interface (e.g. “ccl_iid<ISomething> ()”) |
ptr |
receives pointer to requested interface |
Returns:
kResultOk for success, kResultNoInterface if unsupported.
virtual unsigned int CCL_API retain () = 0
Increments the object’s reference count.
virtual unsigned int CCL_API release () = 0
Decrement the object’s reference count.
If the reference count reaches zero, the object is freed in memory.