>>>Does anyone have a routine to get the windows user name through win32API?
>>>Thanks in advance
>>>
>>
>>
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
>>
>That gives me the english name. Can I get tehe name you log in with?
>Is there a paper to explain win32api routines anywhere?
>
That rerieve the WIndows Login id. If you need the specific login accessing a remote device, you nee to use WNetGetUser() which can rerieve trhe id uses to login onto the remote system attachment. It's documented in the MSDN, and ther have been threads on it oiver the last few weeks.
You can also use several AUtomation objects; among the, Wscrupt,Network to retrieve user id, server names and the like,