Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
GetUserNAme
Message
From
18/02/1999 15:42:35
 
 
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Title:
Miscellaneous
Thread ID:
00188863
Message ID:
00189020
Views:
19
>>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
Previous
Reply
Map
View

Click here to load this message in the networking platform