AKing Posted September 3, 2021 Posted September 3, 2021 The code is as follows_ WinAPI_ Getlasterror() and _ WinAPI_ Getlasterrormessage() did not get the extension information returned by dllcall. If msgbox (0,0, @ computername) is removed, it will be normal. Anyone know about it?My AU3 version: 3.3.14.4,win10 32bit#Include <array.au3>#Include <winapi.au3>$sUserName = "jiayu"$sPassword = "123.com"$sDomain = "kings.org"Local $stTokenMsgBox(0,0,@ComputerName)_LogonUser("jiayu","kings.org","123.com",$stToken)Func _LogonUser($sUserName,$sDomain,$sPassword,$stToken) DllCall("advapi32.dll", "int", "LogonUser", "str", $sUserName, "str", $sDomain, "str", $sPassword, "DWORD", 3, "DWORD", 0, "ptr*", $stToken) ;https://msdn.microsoft.com/en-us/library/aa378184.aspx $LastErrorMessage = _WinAPI_GetLastErrorMessage() $LastError = _WinAPI_GetLastError() MsgBox(0, "Error", $LastError) MsgBox(0, "ErrorMessage", $LastErrorMessage)EndFunc
Solution AKing Posted September 3, 2021 Author Solution Posted September 3, 2021 upgrade au3 version to 3.3.15.4 solved
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now