GetUserName (Return Network User Name)

Top  Previous  Next

 

GETUSERNAME( )

GETUSERNAME Returns the current default user name

 

GETUSERNAME is used to retrieve the current default user name, or the user name used to establish a network connection. GETUSERNAME returns a blank string if an error is encountered.

To add support for this utility to your existing applications, you need only include the CWUTIL.INC file in the Global Map section of your program:

INCLUDE('CWUTIL.INC'),ONCE

Return Data Type:     STRING

Example:

 GLO:LoginName = GETUSERNAME()   !return a unique login name