读取指定地址的单精度浮点数 - ReadFloatAddr
函数简介
读取指定地址的单精度浮点数。
接口名称
ReadFloatAddr
DLL调用
float ReadFloatAddr(long instance, long hwnd, long addr);
参数说明
| 参数名 | 类型 | 说明 |
|---|---|---|
| instance | 长整数型 | OLAPlug对象的指针,由 CreateCOLAPlugInterFace 接口生成。 |
| hwnd | 长整数型 | 窗口句柄 |
| addr | 长整数型 | 地址 |
示例
C++
long instance = CreateCOLAPlugInterFace();
// hwnd 为目标窗口句柄
// 直接使用地址读取单精度浮点数
float val = ReadFloatAddr(instance, hwnd, 0x12345678);
printf("读取到的浮点数: %f\n", val);
Python
# 待补充
返回值
读取到的单精度浮点数。
