MCPcopy Create free account
hub / github.com/HelloBush/Java_MHXYdemo / ReadString

Method ReadString

src/pkgDm/Dm2Java.java:1138–1140  ·  view source on GitHub ↗

读取指定地址的字符串,可以是GBK字符串或者是Unicode字符串.(必须事先知道内存区的字符串编码方式) @param hwnd 指定搜索的窗口句柄或者进程ID. 默认是窗口句柄. 如果要指定为进程ID,需要调用SetMemoryHwndAsProcessId @param addr 用字符串来描述地址,类似于CE的地址描述,数值必须是16进制,里面可以用[ ] + -这些符号来描述一个地址。+表示地址加,-表示地址减;模块名必须用<>符号来圈起来 例如: 1. "4DA678" 最简单的方式,用绝对数值来表示地址 2. "<3

(int hwnd,String addr,int type,int len)

Source from the content-addressed store, hash-verified

1136 * @return 读取到的字符串,注意这里无法判断读取是否成功
1137 */
1138 public String ReadString(int hwnd,String addr,int type,int len){
1139 return Dispatch.call(dm, "ReadString",hwnd,addr,type,len).getString();
1140 }
1141
1142 /**
1143 * 把字符串转换成二进制形式

Callers

nothing calls this directly

Calls 2

callMethod · 0.95
getStringMethod · 0.45

Tested by

no test coverage detected