Skip to content

写入指定地址的字符串 - WriteStringAddr

函数简介

写入指定地址的字符串。

接口名称

WriteStringAddr

DLL调用

int WriteStringAddr(long instance, long hwnd, long addr, int type, string value);

参数说明

参数名类型说明
instance长整数型OLAPlug对象的指针,由 CreateCOLAPlugInterFace 接口生成。
hwnd长整数型窗口句柄。
addr长整数型地址。
type整数型字符串类型(0:Ascii,1:Unicode,2:UTF8)。
value字符串要写入的字符串。

示例

SDK 调用

cpp
#include "OLAPlugServer.h"

OLAPlugServer ola;
ola.WriteStringAddr(hwnd, addr, value);
csharp
using OLAPlug;

var ola = new OLAPlugServer();
ola.WriteStringAddr(hwnd, addr, value);
python
from OLAPlugServer import OLAPlugServer

ola = OLAPlugServer()
ola.WriteStringAddr(hwnd, addr, value)
java
import com.olaplug.OLAPlugServer;

OLAPlugServer ola = new OLAPlugServer();
ola.WriteStringAddr(hwnd, addr, value);
go
import "github.com/ola/olaplug/olaplug"

ola, _ := olaplug.NewOLAPlugServer("OLAPlug_x64.dll")
defer ola.ReleaseObj()
ola.WriteStringAddr(hwnd, addr, value)
rust
use olaplug::OLAPlugServer;

let ola = OLAPlugServer::new("OLAPlug_x64.dll").unwrap();
ola.write_string_addr(&hwnd, &addr, &value);
cpp
var ola = com("OlaPlug.OlaSoft")
ola.WriteStringAddr(hwnd, addr, value);
vbscript
Set ola = CreateObject("OlaPlug.OlaSoft")
ola.WriteStringAddr(hwnd, addr, value);
text
.局部变量 ola, OLAPlug
ola.创建 ()
ola.WriteStringAddr(hwnd, addr, value)
aardio
import OLAPlugServer;
var ola = OLAPlugServer();
ola.WriteStringAddr(hwnd, addr, value);
text
变量 ola <类型 = OLAPlugServer>
ola = 新建 OLAPlugServer
ola.WriteStringAddr(hwnd, addr, value);
cpp
#include "OLAPlugServer.h"

OLAPlugServer ola;
ola.WriteStringAddr(hwnd, addr, value);

原生 DLL 调用

cpp
long instance = CreateCOLAPlugInterFace();
WriteStringAddr(instance, hwnd, addr, value);
csharp
long instance = CreateCOLAPlugInterFace();
WriteStringAddr(instance, hwnd, addr, value);
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()
WriteStringAddr(instance, hwnd, addr, value)

返回值

成功返回 1;失败时接口返回值即为错误码

返回值说明
1成功。
0参数/格式错误,或非驱动模式下的一般失败。
驱动 StatusMemoryMode≥2 时见 驱动错误码说明