To Gerald - I've included a MapBasic example that demonstrate the the use of the GetUserName function
==================================================== Declare Function GetUserName Lib "advapi32.dll" Alias "GetUserNameA" (lpBuffer As String, nSize As Integer) As Integer Declare Sub Main sub Main dim strUserName as string dim nSize as integer, nLeng as integer nSize = 255 strUsername = space$(nSize) nLeng = GetUserName (strUserName,nSize) strUsername = left$(strUserName,nSize-1) note (strUsername) end sub ==================================================== regards Bo Thomsen GeoConsult I/S Denmark -----Oprindelig meddelelse----- Fra: Kornelsen, Gerald [mailto:[EMAIL PROTECTED] Sendt: 4. juni 2004 15:31 Til: '[EMAIL PROTECTED]' Emne: MI-L Get userid in MapBasic No users in our office are allowed to use the hard drives on their pcs. I am being forced to write code to save temporary "find" files from a number of users on a network drive. (Find a land parcel, map it, delete the files.) Obviously, if they all use the same file name, they will be overwriting each others' files. I would like to use the userid so I can save the file with that name, and they can all share the same network folder. I'm not very good with api's, but could someone point me in the right direction for getting that piece of data from the user's pc in MapBasic 4? Gerald Kornelsen, C.E.T., A.A.M. GIS Technologist City of Winnipeg Property Assessment Department ph: 986-4975 e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- List hosting provided by Directions Magazine | www.directionsmag.com | To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Message number: 12036 --------------------------------------------------------------------- List hosting provided by Directions Magazine | www.directionsmag.com | To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Message number: 12048
