Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Changing servers from novell to win2k
Message
From
21/01/2003 12:59:04
 
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
00742709
Message ID:
00743826
Views:
14
>
? ALLTRIM(SUBSTR(SYS(0), AT("#", SYS(0))+1))
or
>* Function GetUserName
>* Returns Windows user name
>
>local lcBuffer, lnSize, lnRetCode, lcUserName
>lcBuffer = repl(chr(0),64)
>lnSize = LEN(lcBuffer) -1
>Declare Long WNetGetUserA in "mpr.dll" As GetUserName ;
>				STRING @lc0, STRING @lcBuffer, LONG @lnSize
>lnRetCode = GetUserName("", @lcBuffer, @lnSize )
>lcUserName = left(lcBuffer, at(chr(0), lcBuffer)-1)
>return lcUserName
And the above works great on a client connected to Novell, too.
-Henry-
Previous
Reply
Map
View

Click here to load this message in the networking platform