调用Kernel32.dll 中的GetSystemTimeAsFileTime 出错[已解决]
本帖最后由 fenhanxue 于 2017-2-10 20:39 编辑Dim $bbb
DllCall("Kernel32.dll",'none','GetSystemTimeAsFileTime','long',$bbb)
MsgBox(0,'',$bbb)运行后,直接程序出错,是我代码有误么?
解决答案:
3L
附上GetSystemTimeAsFileTime 说明:
类型出错,试试下列代码
Local $a = DllStructCreate($tagFILETIME)
DllCall("kernel32.dll", "none", "GetSystemTimeAsFileTime", "struct*", $a)
If @error Then MsgBox(0,0,@error)
MsgBox(0,0,DllStructGetData($a, 1))
MsgBox(0,0,DllStructGetData($a, 2))
Local $tFileTime = DllStructCreate('dword;dword')
DllCall("kernel32.dll", "none", "GetSystemTimeAsFileTime", "ptr", DllStructGetPtr($tFileTime))
MsgBox(0, 0, DllStructGetData($tFileTime, 1) & @CRLF & DllStructGetData($tFileTime, 2))
页:
[1]