node-windows-x64
Version:
node windows x64
80 lines (69 loc) • 1.78 kB
TypeScript
export * from "./aa";
export * from "./byte-table";
export * from "./mem";
export * from "./target";
export * from "./tools";
export * from "./va_manage";
export * from "./win32_gui";
type nt_t =
| "int"
| "uint"
| "int64"
| "uintptr"
| "float"
| "double"
| "str"
| "wstr";
type rnt_t = nt_t | "void";
export declare function invoke<T>(option: {
/**
* 模块名
*/
module?: string;
/**
* 函数名,或者函数地址,或者CEAddtrssString
*/
method: string | number;
/**
* 参数最多32个
*/
args?: (
| ((
rcx?: number,
rdx?: number,
r8?: number,
r9?: number,
lpOtherArg?: number
) => any)
| number
| string
)[];
/**
* 如果arg是字符串,将在invoke中保存到内存,默认存的char类型
*
* 如果调用unicode的函数(method后缀带W的),则需要设置将isWideChar设置为true
*
* invoke会自动检查method是否包含有W的后缀,如果包含则自动保存为wchar_t, 如果出现意外,将isWideChar设置为false
*/
isWideChar?: boolean;
/**
* 默认会猜测args中每个参数的类型,但是不能分辨整数和浮点数
*
* 使用 argsType 明确每个参数的类型
*/
argsType?: (
| nt_t
| "fn"
| `fn():${rnt_t}`
| `fn(${nt_t}):${rnt_t}`
| `fn(${nt_t},${nt_t}):${rnt_t}`
| `fn(${nt_t},${nt_t},${nt_t}):${rnt_t}`
// 更多的参数,按照fn的参数方式发送,ts不检查,函数运行时还是会检查
| `fn2(${string}):${string}`
)[];
/**
* 函数返回的类型, 默认 uintptr, 无符号整数就用 uintptr
*/
retType?: "uintptr" | "int" | "int64" | "float" | "double";
}): T;
export declare function test(...args: any[]): any;