The UPMEULGN API logs on a user. This function supports a logon prompt and registers user IDs like the command-line logon.
To use the UPMEULGN API, you must be linked to the UPM.LIB library. In addition, you need at least 8KB of free stack space.
Restrictions
A call to this API can be issued only from an OS/2 application to the local computer.
#include <upm.h> LSINT LSFAR LSPAS UPMEULGN(pszUserID, pszPassword, pszRemotename, remotetype, flags); /* 16 bit */ LSINT LSFAR LSPAS U32EULGN(pszUserID, pszPassword, pszRemotename, remotetype, flags); /* 32 bit */
See Common Parameter Definitions for descriptions of parameters not defined here.
pszPassword
The following table lists the return codes most significant to this API.
(See API Return Codes for a complete
list of return codes.) ┌────────────────────────┬─────────────────────────────────────────────────────┐│SYMBOLICCONSTANT
│MEANING │
├────────────────────────┼─────────────────────────────────────────────────────┤
│ UPM_OK │ The user was logged on successfully. │
├────────────────────────┼─────────────────────────────────────────────────────┤
│ UPM_LOG_INPROC │ Another logon was being processed; the logon │
│ │ attempt was not successful. │
├────────────────────────┼─────────────────────────────────────────────────────┤
│ UPM_BAD_TYPE │ The remote type specified was not valid. │
├────────────────────────┼─────────────────────────────────────────────────────┤
│ UPM_NOMEM │ Insufficient memory is available to process the │
│ │ request. │
├────────────────────────┼─────────────────────────────────────────────────────┤
│ UPM_LOG_FILE_NOT_FOUND │ A required logon program was not found.
│
├────────────────────────┼─────────────────────────────────────────────────────┤
│ UPM_FAIL _ SECURITY │TheuserIDorpasswordcouldnotbevalidated
. │
├────────────────────────┼─────────────────────────────────────────────────────┤
│ UPM_ULP_LOADED │ The local logon failed; a local logon with a user
│
│ │ logon profile is already active. │
├────────────────────────┼─────────────────────────────────────────────────────┤
│ UPM_PASSWORD_EXP │ The logon failed; the user's password is expired.
│
├────────────────────────┼─────────────────────────────────────────────────────┤
│ UPM_UNAVAIL │ The logon failed; the remote node or domain could
│
│ │ not be contacted to process the logon request. │
├────────────────────────┼─────────────────────────────────────────────────────┤
│ UPM_ACTIVE │ The domain logon or logoff failed; a domain logon,
│
│ │ logoff, or the LAN Requester graphical user inter- │
│ │ face is active. │
├────────────────────────┼─────────────────────────────────────────────────────┤
│ UPM_SS_PWDEXPWARNING │ The local logon succeeded. The user's password
is │
│ │ expired. │
├────────────────────────┼─────────────────────────────────────────────────────┤
│ UPM_SS_BUSY │ The local logon failed; the secure shell was busy.
│
├────────────────────────┼─────────────────────────────────────────────────────┤
│ UPM_SS_DEAD │ The local logon failed; the secure shell has │
│ │ stopped. │
├────────────────────────┼─────────────────────────────────────────────────────┤
│ UPM_LOGGED │ The domain logon failed because a domain logon has
│
│ │ already occurred. │
├────────────────────────┼─────────────────────────────────────────────────────┤
│ UPM_SYS_ERROR │ An unexpected system error occurred. │
├────────────────────────┼─────────────────────────────────────────────────────┤
│ UPM_BAD_PARAMETER │ The user ID, password, or remote name was not
│
│ │ valid. │
└────────────────────────┴─────────────────────────────────────────────────────┘