>FUNCTION GetCompName >* Declare the API function >DECLARE INTEGER GetComputerName IN Win32API ; > STRING @cComputerNameBuffer, ; > INTEGER @nLengthOfName >LOCAL cMyBuffer, nBufferLen, nResult, cReturnVal >* >* Create a fixed-length buffer to hold result; we'll examine the buffer length >* after the call to see how long the name really is - under Win32, it shouldn't exceed 15 chars + null >* >cMyBuffer = SPACE(255)+CHR(0) >nBufferLen=256 >* >* Note how seriously I believe the values in the VC .h files! >* >nResult = GetComputerName(@cMyBuffer, @nBufferLen) >IF nResult = 1 > cReturnVal=STRTRAN(LEFT(cMyBuffer,nBufferLen),CHR(0),'') >ELSE > cReturnVal = '' >ENDIF >RETURN cReturnVal >Sys(0) has worked for me quite well. Another thing I get from using it is the current user name if on network environment (which is 100% of the time). Can you post corresponding API (for getting user name that is)? TIA