找回密码
 加入
搜索
查看: 1486|回复: 0

[系统综合] 為何執行不起來

[复制链接]
发表于 2011-6-16 17:19:44 | 显示全部楼层 |阅读模式
$hostname = "server111"
ip = "192.168.1.1"

For $x = 1 to 5
_build($x)
Next

Func _build($x)
        DllStructCreate("char hostname["& StringLen($hostname) &"];char ip[" & StringLen($ip) & "];ulong status")
        if @error Then
                MsgBox(0,"","在 DllStructCreate 內發生錯誤" & @error);
                exit
        endif
        DllStructSetData($x,"hostname","aaa")
        DllStructSetData($x,"ip","bbb")
        DllStructSetData($x,"status","ccc")
EndFunc

For $x =1 to 5
    ConsoleWrite(DllStructGetData($x,"hostname") & @CRLF & DllStructGetData($x,"ip") & @CRLF & DllStructGetData($x,"status") & @CRLF)
Next
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-9-21 04:21 , Processed in 0.077485 second(s), 23 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表