Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Finding out who the user is...
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00178748
Message ID:
00178939
Views:
60
>LOCAL ;
> lcNull, ;
> lcUserId, ;
> lnLen
>
>lcNull=""
>lcUserId=SPACE(255)
>lnLen=255
>
>* Use the WNetGetUser function in the Win32API to get the user id
>DECLARE INTEGER WNetGetUser IN WIN32API String @, String @, Integer @
>IF WNetGetUser(@lcNull,@lcUserId,@lnLen)=0
> lcUserId=UPPER(LEFT(lcUserId,AT(CHR(0),lcUserId)-1))
>ELSE
> lcUserId = ""
>ENDIF
>
>RETURN ALLTRIM(lcUserId)

Mike,

Does that work with all OSs, NOSs, and Network clients? If so, thanks for another very useful hint!

Regards,
Rich Addison, Micro Vane, Inc., Kalamazoo, MI
Relax, don't worry, have a homebrew.
- Charlie Papazian, The New Complete Joy of Home Brewing
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform