>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