Description
Ends a session with the MAPI messaging system.
Syntax
status = MAPILogoff(session[, parent])
Parameters
The MAPILogoff function has the following parameters.
Parameter | Description |
---|---|
session | Contains a MAPI session handle returned by MAPILogon. |
parent | Contains the name of an OpenInsight parent window. If not specified any dialog box displayed will be application modal. |
After the logoff function completes successfully the MAPI session handle will no longer be valid.
Returns
1 for successful execution or 0 for failure.
If function execution fails, you can retrieve a text error message by calling the Get_Status function. For example, to display an error message on the screen, include the following error handling routine in your code:
Get_Status(ErrMsg)
Msg(@window, ErrMsg)
See also
Example
Subroutine DemoMAPILogoff(var) * Logs on to MAPI and logs off $INSERT MAPI_EQUATES Declare Function MAPILogon, MAPILogoff Declare Subroutine Msg, Get_Status if MAPILogon(session) then if MAPILogoff(session) then Msg(@window, "Logon and logoff successful") end else Get_Status(display) Msg(@window, display) end end else Get_Status(display) Msg(@window, display) end return