>I found your message about the API calls, and the sys(0) and GetUserName work fine. However, they show you the name of the user who logged onto Windows, not the current user if there have been subsequent logins. I haven't figured out how to use GetNetUser function. Would it be necessary to get use a Novell library for this?
>
>If so, do you know of example of the syntax I would need to use?
You'd use the WNetGetUser() API call; if you know the name of either a local resource mapped to the server, or a valid UNC on the server that the user has requisite permissions to:
DECLARE INTEGER WNetGetUser IN MPR.DLL ;
STRING @ lpRemoteResource, ;
STRING @ lpUserBuffer, ;
INTEGER @ lpdwBufferSize
cUNC='\\ServerName\ShareName'+CHR(0)
cUserID = SPACE(261)
nSize = 260
IF WNetGetUser(cUNC,@cUserID,@nSize) = 0
? LEFT(cUserid,AT(CHR(0),cUserID)-1)
ENDIF
This works fine in an MS Network environment, properly identifying the domain and user login for a mapped drive or UNC. I have not tested it under an NDS environment.