• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Loading Modules Using Node-API
2
3The [napi_load_module](../napi/use-napi-load-module.md) function in Node-API is used to load modules within the current HAP/HSP/HAR package project from the host thread. Although its usage scenarios are somewhat restricted, it offers a straightforward way to pass parameters. In contrast, the [napi_load_module_with_info](../napi/use-napi-load-module-with-info.md) 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.
4