Microsoft DirectX 9.0 |
The CUnknown object implements the IUnknown interface. Most Component Object Model (COM) objects in Microsoft® DirectShow® derive from CUnknown.
If you implement a COM object, you might want to derive it from CUnknown. Deriving from CUknown provides a thread-safe implementation, and saves you the trouble of implementing IUnknown.
For a detailed discussion of how to use this base class, see How to Implement IUnknown. What follows is a brief summary:
Requirements
Header: Declared in Combase.h; include Streams.h.
Library: Use Strmbase.lib (retail builds) or Strmbasd.lib (debug builds).
Protected Member Variables | |
m_cRef | Reference count. |
Public Methods | |
CUnknown | Constructor method. |
~CUnknown | Destructor method. Virtual. |
GetOwner | Retrieves a pointer to the controlling IUnknown. |
INonDelegatingUnknown Methods | |
NonDelegatingAddRef | Increments the reference count. |
NonDelegatingQueryInterface | Retrieves an interface pointer and increments the reference count. |
NonDelegatingRelease | Decrements the reference count. |