本帖最后由 拉风晓晓 于 2010-9-11 15:10 编辑 Run(@ComSpec & ' /k ' & 'regsvr32 /s ' & @SystemDir & "\dm.dll", "", @SW_HIDE)
ProcessClose("cmd.exe")
$aa = ObjCreate("dm.dmsoft")
Sleep(2000)
ConsoleWrite($aa.ver()&@CRLF)
$dll=DllOpen(@SystemDir & "\dm.dll")
Global $x1,$y1,$x2,$y2,$hwnd
$arect = DllStructCreate("long;long;long;long")
Global $hwnd = WinGetHandle("")
ConsoleWrite($hwnd)
DllCall($dll,"long","GetWindowRect","hwnd",$hwnd, "long",$x1,"long",$y1,"long",$x2,"long",$y2) ; 关键这里错
$l = DllStructGetData($arect,1)
$t = DllStructGetData($arect,2)
$r = DllStructGetData($arect,3)
$b = DllStructGetData($arect,4)
MsgBox(0,"","x1="&$l&" y1="&$t&"x2="&$r&" y2="&$b)
Exit
这样也不行,可以正常执行,但值为0 |