fenhanxue 发表于 2017-2-9 22:46:43

调用Kernel32.dll 中的GetSystemTimeAsFileTime 出错[已解决]

本帖最后由 fenhanxue 于 2017-2-10 20:39 编辑

        Dim $bbb
        DllCall("Kernel32.dll",'none','GetSystemTimeAsFileTime','long',$bbb)
       
        MsgBox(0,'',$bbb)运行后,直接程序出错,是我代码有误么?




解决答案:

3L

附上GetSystemTimeAsFileTime 说明:

chamlien 发表于 2017-2-10 18:39:22

类型出错,试试下列代码

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))

haijie1223 发表于 2017-2-10 20:15:50

Local $tFileTime = DllStructCreate('dword;dword')
DllCall("kernel32.dll", "none", "GetSystemTimeAsFileTime", "ptr", DllStructGetPtr($tFileTime))
MsgBox(0, 0, DllStructGetData($tFileTime, 1) & @CRLF & DllStructGetData($tFileTime, 2))
页: [1]
查看完整版本: 调用Kernel32.dll 中的GetSystemTimeAsFileTime 出错[已解决]