# iunknown.h ## **Overview** **Related Modules:** [Samgr](Samgr.md) **Description:** Provides the base class and default implementation for external functions of system capabilities. **Since:** 1.0 **Version:** 1.0 ## **Summary** ## Data Structures
Defines the IUnknown class. |
|
Defines the IUnknown implementation class. |
DEFAULT_VERSION 0x20 |
Defines the default IUnknown version. You can customize the version. |
Defines the macro for inheriting the IUnknown interface. |
|
Defines the macro for inheriting the classes that implement the IUnknown interface. |
|
Defines the default marco for initializing the IUnknown interface. |
|
IUNKNOWN_ENTRY_BEGIN(version) |
Defines the macro for initializing the classes that implement the IUnknown interface. |
IUnknown Defines the end macro for initializing the IUnknown implementation object. |
|
GET_IUNKNOWN(T) (IUnknown *)(&((T).iUnknown)) |
Obtains the pointer of the IUnknown interface object from the subclass object T (generic macro) of the IUnknown implementation class. |
typedef struct IUnknownEntry Defines the IUnknown implementation class. |
IUNKNOWN_AddRef (IUnknown *iUnknown) |
Increments the reference count in this IUnknown interface. |
IUNKNOWN_QueryInterface (IUnknown *iUnknown, int ver, void **target) |
Queries the IUnknown interfaces of a specified version (downcasting). |
IUNKNOWN_Release (IUnknown *iUnknown) |
Releases a reference to an IUnknown interface that is no longer used. |