aardio 文档
aardio 范例: 结构体
相关文档
import console;
var pt = {
int x;
int y;
}
::User32.GetCursorPos(pt);
console.log(pt.x,pt.y);
var ret,pt = ::User32.GetCursorPos({int x;int y;});
var ret,pt = ::User32.GetCursorPos({int x = 0;int y = 0;});
class PT{
int x;
int y;
}
var pt = PT();
::User32.GetCursorPos(pt);
var pt = ::POINT();
::User32.GetCursorPos(pt);
console.log(pt.x,pt.y);
var ptBuffer = raw.buffer({int x;int y;});
::User32.GetCursorPos(ptBuffer);//使用结构体指针作为参数调用 API
var pt = raw.convert(ptBuffer,{int x;int y;});//自内存中还原结构体
console.log(pt.x,pt.y);
console.pause();
Markdown 格式