LogonUser advapi32.dll function
Can anyone tell me why this wouldn't work:
Private Declare Function LogonUser Lib "advapi32.dll" Alias "LogonUserA"
_
(ByVal lpszUsername As String, ByVal lpszDomain As String, _
ByVal spszPassword As String, ByVal dwLogonType As Long, _
ByVal dwLogonProvider As Long, phToken As Long) As Long
Private Const LOGON32_LOGON_NETWORK = 3
Private Const LOGON32_PROVIDER_DEFAULT = 0
.
.
.
lReturn = LogonUser(Username, DomainName, Password, _
LOGON32_LOGON_NETWORK, LOGON32_PROVIDER_DEFAULT,
lSIDBufLen)
I could swear it worked before, but now it returns 0 (indicating an error),
and GetLastError returns 1314 ("A required privilege is not held by the
client.").
TIA,
Troy Young
Ventana Corporation