# qesdk\_initEx

Source: [https://docs.qualcomm.com/doc/80-PK177-134Y/topic/native_init_ex.html](https://docs.qualcomm.com/doc/80-PK177-134Y/topic/native_init_ex.html)

通过用户提供的许可证密钥初始化 QESDK 会话。qesdk\_initEx 会触发针对 QESDK 的鉴权调用，如果鉴权成功，则返回 QESDK 服务句柄；如果鉴权失败，则返回 NULL。每个会话只调用一次此 API。

qesdk_handle_t qesdk_initEx(char* license, size_t license_size,
                        fwk_event_callback cb) Copy to clipboard

## 参数

| **参数** | **说明** |
| --- | --- |
| License | 许可证文件内容 |
| license\_size | 许可证 blob 的大小 |
| Cb | 用于通知应用程序子系统已断开连接的回调。<br><br><br>                                <br>回调格式如下：<br><br><br>                                <br>typedef void (\*fwk\_event\_callback)(uint32\_t opcodes, uint32\_t subsystems[]);<br><br><br>                                <ul class="ul" id="reference.dita_c7de8a78-b40b-4c05-9d60-5f291454d5d8__properties_pq2_cm5_q5b"><br><br>                                    <li class="li">opcode - 断开连接的子系统的操作码。</li><br><br><br><br>                                    <li class="li">subsystems - 操作码列表：断开连接的子系统。</li><br><br><br>                                </ul> |

## 返回结果

| **返回结果** | **说明** |
| --- | --- |
| qesdk\_handle\_t | 成功时返回 QESDK 服务句柄，出错时返回 NULL。 |

**Parent Topic:** [QESDK 原生 API 概述](https://docs.qualcomm.com/doc/80-PK177-134Y/topic/native_api.html)

Last Published: Jun 22, 2023

[Previous Topic
qesdk\_init](https://docs.qualcomm.com/bundle/publicresource/80-PK177-134Y/topics/native_init.md) [Next Topic
Qesdk 事件回调](https://docs.qualcomm.com/bundle/publicresource/80-PK177-134Y/topics/native_fwk_event_callback.md)