1 Star 0 Fork 4.9K

罗小黑 / docs

forked from OpenHarmony / docs 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
iunknown-h.md 11.54 KB
一键复制 编辑 原始数据 按行查看 历史
wenjun 提交于 2020-09-08 10:08 . add OpenHarmony 1.0 baseline

iunknown.h

Overview

Related Modules:

Samgr

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.

1
https://gitee.com/lawguiren/docs.git
git@gitee.com:lawguiren/docs.git
lawguiren
docs
docs
master

搜索帮助