Skip to content

读取指定地址的双精度浮点数 - ReadDouble

函数简介

读取指定地址的双精度浮点数,地址支持CE数据格式。

接口名称

ReadDouble

DLL调用

double ReadDouble(long instance, long hwnd, string addr);

参数说明

参数名类型说明
instance长整数型OLAPlug对象的指针,由 CreateCOLAPlugInterFace 接口生成。
hwnd长整数型窗口句柄。
addr字符串地址,支持CE数据格式,格式示例见下方。

CE地址格式示例

<Game.exe>+1234            // 模块基址+偏移
<Game.exe>+1234+8+4        // 多级偏移(非指针)
[<Game.exe>+1234]+8+4      // 一级指针+偏移
[[<Game.exe>+1234]+8]+4    // 二级指针+偏移
[[[<module>+offset1]+offset2]+offset3]  // 三级指针
[0x12345678]+10            // 直接地址+偏移

示例

SDK 调用

cpp
#include "OLAPlugServer.h"

OLAPlugServer ola;
// hwnd 为进程/窗口句柄,addr 为目标地址
int val = ola.ReadDouble(hwnd, addr);
csharp
using OLAPlug;

var ola = new OLAPlugServer();
// hwnd 为进程/窗口句柄,addr 为目标地址
int val = ola.ReadDouble(hwnd, addr);
python
from OLAPlugServer import OLAPlugServer

ola = OLAPlugServer()
# hwnd 为进程/窗口句柄,addr 为目标地址
val = ola.ReadDouble(hwnd, addr)
java
import com.olaplug.OLAPlugServer;

OLAPlugServer ola = new OLAPlugServer();
// hwnd 为进程/窗口句柄,addr 为目标地址
int val = ola.ReadDouble(hwnd, addr);
cpp
var ola = com("OlaPlug.OlaSoft")
// hwnd 为进程/窗口句柄,addr 为目标地址
var val = ola.ReadDouble(hwnd, addr)
vbscript
Set ola = CreateObject("OlaPlug.OlaSoft")
' hwnd 为进程/窗口句柄,addr 为目标地址
val = ola.ReadDouble(hwnd, addr)
text
.局部变量 ola, OLAPlug
ola.创建 ()
' hwnd 为进程/窗口句柄,addr 为目标地址
val = ola.ReadDouble(hwnd, addr)
aardio
import OLAPlugServer;
var ola = OLAPlugServer();
// hwnd 为进程/窗口句柄,addr 为目标地址
var val = ola.ReadDouble(hwnd, addr);
text
变量 ola <类型 = OLAPlugServer>
ola = 新建 OLAPlugServer
// hwnd 为进程/窗口句柄,addr 为目标地址
整数 val = ola.ReadDouble(hwnd, addr)
cpp
#include "OLAPlugServer.h"

OLAPlugServer ola;
// hwnd 为进程/窗口句柄,addr 为目标地址
int val = ola.ReadDouble(hwnd, addr);

原生 DLL 调用

cpp
long instance = CreateCOLAPlugInterFace();
ReadDouble(instance, hwnd, addr);
csharp
long instance = CreateCOLAPlugInterFace();
ReadDouble(instance, hwnd, addr);
python
from ctypes import CDLL, c_int, c_int64, create_string_buffer

ola = CDLL("OLAPlug_x64.dll")
ola.CreateCOLAPlugInterFace.restype = c_int64
instance = ola.CreateCOLAPlugInterFace()
ReadDouble(instance, hwnd, addr)

返回值

返回值说明
(返回值)读取到的双精度浮点数。