The UPMEULGF API logs a user off the system.
To use this API, you must be linked to the UPM.LIB library. In addition, you should have 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.
All parameters must be valid; if not, an error is returned.
For the remotetype of UPM_DOMAIN and UPM_DOMAIN_MAX_FORCE, the pszRemotename is ignored if the logon was performed with no verification or local verification.
#include <upm.h> LSINT LSFAR LSPAS UPMEULGF(pszUserID, pszRemotename, remotetype); /* 16 bit */ LSINT LSFAR LSPAS U32EULGF(pszUserID, pszRemotename, remotetype); /* 32 bit */
See Common Parameter Definitions for descriptions of parameters not defined here.
pszRemotename
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 off successfully. │
├───────────────────┼──────────────────────────────────────────────────────────┤
│ UPM_BAD_TYPE │ The remote type specified was not valid. │
├───────────────────┼──────────────────────────────────────────────────────────┤
│ UPM_NOT_LOGGED │ The specified user ID was not logged on. │
├───────────────────┼──────────────────────────────────────────────────────────┤
│ UPM_OPEN_SESSIONS │ The domain logoff failed because a domain logon has
│
│ │ active open sessions. │
├───────────────────┼──────────────────────────────────────────────────────────┤
│ UPM_SYS_ERROR │ An unexpected system error occurred. │
├───────────────────┼──────────────────────────────────────────────────────────┤
│ UPM_BAD_PARAMETER │ The user ID or remote name was not valid. │
├───────────────────┼──────────────────────────────────────────────────────────┤
│ UPM_ACTIVE │ The domain logon or logoff failed; a domain logon,
│
│ │ logoff, or the LAN Requester graphical user interface is │
│ │ active. │
└───────────────────┴──────────────────────────────────────────────────────────┘