LogonUser advapi32.dll function 
Author Message
 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



Fri, 22 Dec 2000 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. LogonUser and advapi32.dll

2. LogonUser from advapi32.dll

3. LogonUser and advapi32.dll

4. ADVAPI32.DLL: CryptEncrypt Function

5. LSA functions in advAPI32.dll

6. Crypt functions in ADVAPI32.DLL

7. ADVAPI32.DLL Functions

8. Help Me Please ADVAPI32.DLL The RegSaveKey Function

9. Can't find DLL entry point OpenEventLog in advapi32.dll

10. LogonUser API call in Windows 95/98 / How do you use Secur32.dll/Security.dll

11. LogonUser API call in Windows 95/98 / How do you use Secur32.dll/Security.dll

12. 'regloadkey' function from advapi32

 

 
Powered by phpBB® Forum Software