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:
00171103
Views:
59
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