import win.ui;
/*DSG{{*/
mainForm = win.form(text="aardio工程5";right=564;bottom=234)
mainForm.add(
button={cls="button";text="写入共享内存";left=324;top=156;right=549;bottom=223;font=LOGFONT(h=-16);z=2};
edit={cls="edit";left=16;top=49;right=241;bottom=141;edge=1;font=LOGFONT(h=-16);multiline=1;readonly=1;z=1};
edit2={cls="edit";left=323;top=50;right=546;bottom=142;edge=1;font=LOGFONT(h=-16);multiline=1;z=3};
static={cls="static";text="从共享内存读出的文本";left=14;top=17;right=255;bottom=54;font=LOGFONT(h=-16);transparent=1;z=4};
static2={cls="static";text="从共享内存读出的文本";left=324;top=17;right=565;bottom=54;font=LOGFONT(h=-16);transparent=1;z=5}
)
/*}}*/
mainForm.show();
import godking.lock;
var lock = godking.lock("test");
mainForm.static2.text = "共享内存地址:"++tonumber(lock.sharePointer);
mainForm.setInterval(
function(){
mainForm.edit.text = raw.tostring(lock.sharePointer);
},1000
)
mainForm.button.oncommand = function(id,event){
raw.copy(lock.sharePointer,mainForm.edit2.text);
}
return win.loopMessage();