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
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement