user name:
GetComputerName
GetUserName
WNetGetUser
Enumerating print jobs and retrieving information for default printer (JOB_INFO_1 structures)
How to run FoxPro application under different user name (impersonating user)
Retrieving local computer and user names