Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to access win32api function LogonUser
Message
De
29/12/1998 11:34:19
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00170686
Message ID:
00171222
Vues:
67
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform