获取鼠标特征码 - GetCursorShape
函数简介
获取鼠标特征码。
接口名称
GetCursorShape
DLL调用
long GetCursorShape(long ola);
参数说明
| 参数名 | 类型 | 说明 |
|---|---|---|
| ola | 长整数型 | OLAPlug对象的指针,由 CreateCOLAPlugInterFace 接口生成。 |
示例
C++
long instance = CreateCOLAPlugInterFace();
// 获取当前鼠标特征码
long ptr = GetCursorShape(instance);
if (ptr != 0) {
// 从指针读取特征码字符串
char* shape = GetStringFromPtr(ptr);
printf("鼠标特征码: %s\n", shape);
FreeStringPtr(instance, ptr); // 释放内存
}
Python
# 待补充
返回值
字符串指针地址,包含鼠标特征码。返回 0 表示失败。
注意事项
- 并非所有的游戏都支持后台鼠标特征码,在获取特征码之前需先操作鼠标。
- DLL调用返回字符串指针地址,需要调用 FreeStringPtr 接口释放内存。
