加入收藏
举报
02-14 20:03
#0
文件名称:
iunknown-h.md
所在目录:
Openharmony v1.0 / docs / docs-en / api / api-LinkIoT
文件大小:
11.49 KB
下载地址:
fenwii/OpenHarmony
   
免责声明:本网站仅提供指向 GitHub 上的文件的链接,所有文件的版权归原作者所有,本网站不对文件内容的合法性、准确性或安全性承担任何责任。
文本预览:
# 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












Data Structure Name


Description


IUnknown


Defines the IUnknown class.


IUnknownEntry


Defines the IUnknown implementation class.



## Macros



























Macro Name and Value


Description


DEFAULT_VERSION 0x20


Defines the default IUnknown version. You can customize the version.


INHERIT_IUNKNOWN


Defines the macro for inheriting the IUnknown interface.


INHERIT_IUNKNOWNENTRY(T)


Defines the macro for inheriting the classes that implement the IUnknown interface.


DEFAULT_IUNKNOWN_IMPL


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_ENTRY_END }


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.



## Typedefs









Typedef Name


Description


IUnknownEntry


typedef struct IUnknownEntry


Defines the IUnknown implementation class.



## Functions















Function Name


Description


IUNKNOWN_AddRef (IUnknown *iUnknown)


int


Increments the reference count in this IUnknown interface.


IUNKNOWN_QueryInterface (IUnknown *iUnknown, int ver, void **target)


int


Queries the IUnknown interfaces of a specified version (downcasting).


IUNKNOWN_Release (IUnknown *iUnknown)


int


Releases a reference to an IUnknown interface that is no longer used.


点赞 回复
回帖
支持markdown部分语法 ?