I need help getting the API LogonUser to work, please.
From the MSDN the LogonUser function is
BOOL LogonUser(LPTSTR lpszUsername, LPSTR lpszDomain, LPTSTR
lpszPassword, DWORD dwLogonType, DWORD dwLogonProvider,
PHANDLE phToken);
What I have done is declare a local external function as
follows:
FUNCTION boolean LogonUser(ref string uname,ref string
domain,ref string password, ulong ptype, ulong provider,ref
long token) LIBRARY "ADVAPI32.DLL"
My problem is calling this function and passing valid
parameters, not sure how to poulate the paramters for this
function.
I have no problem using the GetUserNameA() API for the
username.
thanks in advance -Antony
I found a document on the Sybase site pointed me in the
right direction:
"Prototyping API Calls for PowerBuilder" Content Id: 44648
and an article on MSDN helped plug the gaps: "Article ID :
841699"
-Antony
> Hello,
>
> I need help getting the API LogonUser to work, please.
>
> From the MSDN the LogonUser function is
> BOOL LogonUser(LPTSTR lpszUsername, LPSTR lpszDomain,
> LPTSTR lpszPassword, DWORD dwLogonType, DWORD
> dwLogonProvider, PHANDLE phToken);
>
>
> What I have done is declare a local external function as
> follows:
>
> FUNCTION boolean LogonUser(ref string uname,ref string
> domain,ref string password, ulong ptype, ulong provider
> ,ref long token) LIBRARY "ADVAPI32.DLL"