Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
GetUserNAme
Message
De
18/02/1999 15:42:35
 
 
À
18/02/1999 11:27:52
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Titre:
Divers
Thread ID:
00188863
Message ID:
00189020
Vues:
18
>>Does anyone have a routine to get the windows user name through win32API?
>>Thanks in advance
>>
>
>
DECLARE INTEGER GetUserName IN Win32API ;
>    STRING @ UserNameBuffer, ;
>    INTEGER @ lpLength
>
>cName = SPACE(200)
>nLen = 200
>IF GetUserName(@cName, @nLen) # 0
>   * it worked
>   cName = LEFT(cName,nLen - 1)
>ELSE
>   cName = ''
>ENDIF
>
thanks. I must have had a typo somewhre since my code looked almost the same.
Thanks again

Peter
Peter Cortiel
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform