Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to access win32api function LogonUser
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00170686
Message ID:
00171222
Views:
66
If have declare the GetlastErr before declaring the logonUser
also on my situation the return value off logonuser is 0

The getlasterror = 120
120 This function is not supported on this system. ERROR_CALL_NOT_IMPLEMENTED

I did not understand the ASCI and UNICODE stuff from (Paul Vlad Tatavu)
I changed the declaration in AS LogonUsera and AS LogonUserw but no result
Checked on win98 machine accessing an NT domain and server



>Using this code, I get a '0' result. I am running NT Wks4
>and am a Domain Admin on a network (strictly NT Servers).
>
>DECLARE INTEGER LogonUser IN WIN32API;
>STRING lpszUserName, ;
>STRING lpszDomain, ;
>STRING lpszPassword, ;
>INTEGER dwLogonType, ;
>INTEGER dwLogonProvider, ;
>INTEGER @ phToken
>
>cUser = 'user1'
>cDomain = 'MyDomain'
>cPasswd = 'xyzzy'
>nLogonType = 2 && LOGON32_LOGON_INTERACTIVE (see WINBASE.H)
>nProvider = 0 && LOGON32_PROVIDER_DEFAULT (see WINBASE.H)
>nToken = 0
>nResult = LogonUser(cUser, cDomain, cPasswd, nLogonType, nProvider, @nToken)
>
>? nResult
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform