Cite API


  • 在 Agine SDK 中,所有 API 及其常用 function 或 const 均被编写在可被 include 的 Header File 中。
  • 开发者可以通过包含特定的 Header File 来引用这些 API 或 function 以及 const 等。
  • 开发者需要通过引用 API 来与 Agine 进行交互,以处理工作。

下述代码将演示如何引用一个 API 并调用它:


  • 包含相关的 Header File
// The declaration contains the necessary header files
#include <h.studio>
// The declaration contains the h.process file
#include <h.process>
  • 调用 h.process 中声明的 GetExtProcessFile function
 // Define a LPCSTR type of variable lpcFile and assign the return value of the GetExtProcessFile function to it
 // Suppose the target process ID is 1000
LPCSTR lpcFile = GetExtProcessFile(1000);
  • 调用 h.studio 中声明的 output function 将 lpcFile 变量的值输出
  // Call output lpcFile
  output(lpcFile);

经过上述代码,我们实现了:

  1. 包含 h.studio and h.process 头文件
  2. 调用 h.process 中声明的 GetExtProcessFile function 获取指定进程的文件路径(.app)
  3. 调用 output function 输出所获取到的文件路径

results matching ""

    No results matching ""