获取模块导出函数地址 - DmaGetProcAddress
函数简介
获取指定模块中导出函数的地址。(高级版功能,普通版无法使用)
接口名称
DmaGetProcAddress
DLL调用
int64_t OLA_CALL_TYPE DmaGetProcAddress(int64_t instance, int64_t deviceId, int32_t pid, OLA_STRING_INPUT moduleName, OLA_STRING_INPUT functionName);
参数说明
| 参数名 | 类型 | 说明 |
|---|---|---|
| instance | 长整数型 | OLAPlug对象的指针,由 CreateCOLAPlugInterFace 接口生成。 |
| deviceId | 长整数型 | 设备ID |
| pid | 整数型 | 进程 PID |
| moduleName | 字符串 | 模块名,空字符串表示主模块,不区分大小写 |
| functionName | 字符串 | 函数名,区分大小写 |
示例
int64_t funcAddr = DmaGetProcAddress(instance, deviceId, 1234, "kernel32.dll", "CreateFileA");
if (funcAddr > 0) {
printf("CreateFileA 地址: 0x%llx\n", funcAddr);
}
返回值
长整数型:成功返回函数地址 (>0),失败返回 0。
