harmony 鸿蒙Loading Modules Using Node-API

  • 2025-06-06
  • 浏览 (5)

Loading Modules Using Node-API

The napi_load_module function in Node-API is used to load modules within the current HAP/HSP package project from the host thread. Although its usage scenarios are somewhat restricted, it features a straightforward parameter structure. In contrast, the napi_load_module_with_info function supports loading of multiple file types, including HAR packages, HSP packages, and native modules, from both the host thread and child threads. This interface provides more extensive capabilities but requires marking the information of the loaded package during usage.

你可能感兴趣的鸿蒙文章

harmony 鸿蒙ArkTS

harmony 鸿蒙Configuring arkOptions in build-profile.json5

harmony 鸿蒙Asynchronous Lock

harmony 鸿蒙Ark Bytecode File Format

harmony 鸿蒙Naming Conventions for Ark Bytecode Functions

harmony 鸿蒙Ark Bytecode Fundamentals

harmony 鸿蒙Overview of Ark Bytecode

harmony 鸿蒙Shared Container

harmony 鸿蒙Asynchronous Waiting

harmony 鸿蒙ArkTS Cross-Language Interaction

0  赞