6.80 LceUseUserId
This function specifies the host User Id to be used when accessing the host. LANSA programs and files are secured by User Id. Use this function when you want to specify a user other than the one used by default when starting some communications software to the host.
BOOL |
LceUseUserId |
(int |
iSession, |
|
|
char far * |
strValue ) |
Parameters
iSession |
The session identifier as returned by LceGetSessionId. |
strValue |
The User Identifier. The length should not exceed USERID_LONG_LENGTH as defined in the LCOE.H header file. |
Return Values
TRUE is returned if the session can accept the value.
FALSE is returned if an error occurs.
Notes
If you use this function, you must also use the LceUsePassword function.
If you are using any Windows version of LANSA Open with Client Access/400, this function is optional. The default value is the user profile and password used when the communications to the host was started. Whilst Client Access/400 has the capability for LANSA Open to provide a User Id, other routers may not permit this, in which case calls to this function are ignored.
As User IDs can easily be changed on the host, have the User Id entered by the user or store them in a file which can easily be changed.
- This function must be executed after LceGetSessionId and before LceOpenSession.
Related Functions