This function gets the current user ID that is associated with a specified system object. This is the user ID that is being used for connections to the iSeries™ server.
UINT CWB_ENTRY cwbCO_GetUserIDEx(
cwbCO_SysHandle system,
LPSTR userID,
PULONG length );
The following list shows common return values.
The user ID may or may not have been validated on the iSeries system yet. To make sure it has been, call cwbCO_Signon or cwbCO_Connect before calling this API.
If no user ID has been set and a signon has not occurred for the system object, the returned user ID will be the empty string, even if a default user ID has been configured for the iSeries system.