Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
GetUserNAme
Message
From
18/02/1999 16:05:18
 
 
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Title:
Miscellaneous
Thread ID:
00188863
Message ID:
00189029
Views:
11
>>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
>
That gives me the english name. Can I get tehe name you log in with?
Is there a paper to explain win32api routines anywhere?

Peter
Peter Cortiel
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform