To do this you need to make an API call: Declare Function GetUserName Lib "advapi32.dll" Alias "GetUserNameA" (ByVal lpBuffer As String, nSize As Integer) As Integer
Then just pass to it a string that will be filled with the user name and an integer value to get the size of the string returned. The function will return 0 if it failed and non-zero if it succeeds. Look on http://www.vbapi.com for more information. -------------------------------- Colin Henderson GI Developer Ordnance Survey Tel: (0)2380 79 2034 -------------------------------- This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the [EMAIL PROTECTED] For more information on Ordnance Survey products and services, visit our web site at http://www.ordnancesurvey.co.uk -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: 27 June 2002 10:23 To: [EMAIL PROTECTED] Subject: MI-L Calling a User ID I am building a script to automatically tag a line with the name of the person who digitised it. I would like to call the Windows UserName of the currently logged on user to do this. Does anyone know how to call the name of the currenltly logged on user with a MapBasic script? Andrew This E-mail and any files transmitted with it are private and intended solely for the use of the individual or entity to whom they are addressed. If you are not the intended recipient, the E-mail and any files have been transmitted to you in error and any copying, distribution or other use of the information contained in them is strictly prohibited. Nothing in this E-mail message amounts to a contractual or other legal commitment on the part of English Nature unless confirmed by a signed communication. English Nature will make every effort to keep its network free of viruses. However, the recipient of this message will need to scan this message, and any attachments, for viruses, as English Nature can take no responsibility for any computer virus that might be transferred by this e-mail. --------------------------------------------------------------------- List hosting provided by Directions Magazine | www.directionsmag.com | To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] ******************************************************************** This Email and any attachments has been virus checked upon receipt at the OS and is free of all known viruses. ******************************************************************** *************************************************************** For more information on Ordnance Survey products and services, visit our web site at http://www.ordnancesurvey.co.uk *************************************************************** --------------------------------------------------------------------- List hosting provided by Directions Magazine | www.directionsmag.com | To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
