Did somebody use LogonUser WinAPI function ? I found declaration in the API text viewer as
LogonUser Lib "kernel32" Alias "LogonUserA" (ByVal lpszUsername As String, ByVal lpszDomain As String, ByVal lpszPassword As String, ByVal dwLogonType As Long, ByVal dwLogonProvider As Long, phToken As Long) As Long
I changed lib name to advapi32.dll since it's actual dll where function should be importd but each its call always returns zero(error) and the same does GetLastError so I can't understand what's wrong ...
I use the following code:
iResult = LogonUser("user", "domain", "password", LOGON32_LOGON_NETWORK, LOGON32_PROVIDER_WINNT50, hToken)
LogonUser Lib "kernel32" Alias "LogonUserA" (ByVal lpszUsername As String, ByVal lpszDomain As String, ByVal lpszPassword As String, ByVal dwLogonType As Long, ByVal dwLogonProvider As Long, phToken As Long) As Long
I changed lib name to advapi32.dll since it's actual dll where function should be importd but each its call always returns zero(error) and the same does GetLastError so I can't understand what's wrong ...
I use the following code:
iResult = LogonUser("user", "domain", "password", LOGON32_LOGON_NETWORK, LOGON32_PROVIDER_WINNT50, hToken)