# 示例代码

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

**需要包括的内容**

    #include "qesdk_ndk.h"Copy to clipboard

      **声明回调**

    void event_callback_handler(uint32_t opcode, uint32_t subsys[]) {
          // Callback to handle QESDK events
          }Copy to clipboard

      **初始化**

    qesdk_handle_t qesdk_handle = qesdk_init(nativeLicense, len, event_callback_handler);Copy to clipboard

      **取消初始化**

    qesdk_error_t ret = qesdk_deinit(qesdk_handle);Copy to clipboard

**上一级主题：** [QESDK 原生 API 概述](https://docs.qualcomm.com/doc/80-PK177-134Y/topic/native_api.html)

Last Published: Jun 22, 2023

[Previous Topic
qesdk\_freeFunctionHandle](https://docs.qualcomm.com/bundle/publicresource/80-PK177-134Y/topics/native_free_function_handle.md) [Next Topic
API 兼容性表](https://docs.qualcomm.com/bundle/publicresource/80-PK177-134Y/topics/api_compatability_table.md)