写入指定地址的整数 - WriteIntAddr
函数简介
写入指定地址的整数。
接口名称
WriteIntAddr
DLL调用
int WriteIntAddr(long instance, long hwnd, long addr, int type, long value);
参数说明
| 参数名 | 类型 | 说明 |
|---|---|---|
| instance | 长整数型 | OLAPlug对象的指针,由 CreateCOLAPlugInterFace 接口生成。 |
| hwnd | 长整数型 | 窗口句柄 |
| addr | 长整数型 | 地址 |
| type | 整数型 | 整数类型(0:32位有符号,1:16位有符号,2:8位有符号,3:64位,4:32位无符号,5:16位无符号,6:8位无符号) |
| value | 长整数型 | 要写入的整数值 |
示例
C++
long instance = CreateCOLAPlugInterFace();
// hwnd 为目标窗口句柄
// 直接使用地址写入32位有符号整数
int ret = WriteIntAddr(instance, hwnd, 0x12345678, 0, 99999);
printf("写入结果: %d\n", ret); // 1成功 0失败
Python
# 待补充
返回值
1 成功,0 失败。
