设置是否把所有内存接口函数中的窗口句柄当作进程ID - SetMemoryHwndAsProcessId
函数简介
设置是否把所有内存接口函数中的窗口句柄当作进程ID。
接口名称
SetMemoryHwndAsProcessId
DLL调用
int SetMemoryHwndAsProcessId(long instance, int enable);
参数说明
| 参数名 | 类型 | 说明 |
|---|---|---|
| instance | 长整数型 | OLAPlug对象的指针,由 CreateCOLAPlugInterFace 接口生成。 |
| enable | 整数型 | 是否启用(0:不启用,1:启用) |
示例
C++
long instance = CreateCOLAPlugInterFace();
// 启用后,所有内存接口的hwnd参数将被当作进程ID使用
SetMemoryHwndAsProcessId(instance, 1);
// 此后可直接传入进程ID进行内存操作
DWORD pid = 1234;
long val = ReadInt(instance, pid, "0x12345678", 0);
Python
# 待补充
返回值
1 成功,0 失败。
