搜索长整型数 - FindIntEx
函数简介
搜索指定范围内的长整型数,可定制步长、多线程、内存类型等。
接口名称
FindIntEx
DLL调用
long FindIntEx(long instance, long hwnd, string addr_range, long int_value_min, long int_value_max, int type, int step, int multi_thread, int mode);
参数说明
| 参数名 | 类型 | 说明 |
|---|---|---|
| instance | 长整数型 | OLAPlug对象的指针,由 CreateCOLAPlugInterFace 接口生成。 |
| hwnd | 长整数型 | 窗口句柄 |
| addr_range | 字符串 | 地址范围 |
| int_value_min | 长整数型 | 最小值 |
| int_value_max | 长整数型 | 最大值 |
| type | 整数型 | 整数类型(0:32位,1:16位,2:8位,3:64位) |
| step | 整数型 | 步长 |
| multi_thread | 整数型 | 是否开启多线程 |
| mode | 整数型 | 搜索模式(0:全部,1:可写,2:不可写,4:可执行,8:不可执行,16:写时复制,32:不写时复制) |
示例
C++
long instance = CreateCOLAPlugInterFace();
// hwnd 为目标窗口句柄
// 搜索32位整数,值范围100~200,步长4,开启多线程,搜索可写内存
long strPtr = FindIntEx(instance, hwnd, "0x00400000-0x7FFFFFFF", 100, 200, 0, 4, 1, 1);
char* result = GetStringFromPtr(strPtr);
printf("搜索结果: %s\n", result);
FreeStringPtr(strPtr);
Python
# 待补充
返回值
返回字符串的指针,格式: "addr1|addr2|...|addrn"。
注意事项
- 返回的字符串指针需调用 FreeStringPtr 释放内存。
