Found this code. Can't test it because I do not have a netware network available.
FUNCTION Novell_UserID
* Function Novell_UserID
** Usage: l_cUserID = Novell_UserID()
UserID = ""
TempCH = 0
DECLARE LONG NWDSCreateContextHandle IN netwin32 ;
LONG @newHandle
DECLARE LONG NWDSFreeContext IN netwin32 ;
LONG newHandle
RetCode = NWDSCreateContextHandle(@TempCH)
IF M.RetCode = 0
* CREATED A CONTEXT HANDLE OK
UserID = SPACE(255)
Declare LONG NWDSWhoAmI IN netwin32 ;
LONG context, STRING @objectName
RetCode = NWDSWhoAmI(M.TempCH, @UserID)
IF M.RetCode = 0
* got the WhoAmI info ok
IF UserID = "CN="
UserID = SUBSTR(UserID, 4)
ENDIF
UserID = STRTRAN(UserID, chr(0), " ") && kill off the null
ELSE
* had an error
ENDIF M.RetCode = 0
* release allocated context handle
RetCode = NWDSFreeContext(M.TempCH)
IF M.RetCode = 0
* context handle released ok
ELSE M.RetCode = 0
* had an error
ENDIF M.RetCode = 0
ENDIF
RETURN Alltrim(UserID)
ENDFUNC
--
Eric den Doop
www.foxite.com - The Home Of The Visual FoxPro Experts