DECLARE INTEGER GetUserName IN Win32API ; > STRING @ UserNameBuffer, ; > INTEGER @ lpLength > >cName = SPACE(200) >nLen = 200 >IF GetUserName(@cName, @nLen) # 0 > * it worked > cName = LEFT(cName,nLen - 1) >ELSE > cName = '' >ENDIF >thanks. I must have had a typo somewhre since my code looked almost the same.