MAPILogoff function

[The use of this function is discouraged. It may be altered or unavailable in subsequent versions of Windows.]

The MAPILogoff function ends a session with the messaging system.

Syntax


ULONG WINAPI MAPILogoff(
  _In_ LHANDLE   lhSession,
  _In_ ULONG_PTR ulUIParam,
       FLAGS     flFlags,
       ULONG     ulReserved
);

Parameters

lhSession [in]

Handle for the Simple MAPI session to be terminated. Session handles are returned by the MAPILogon function and invalidated by MAPILogoff. The value of the lhSession parameter must represent a valid session; it cannot be zero.

ulUIParam [in]

Parent window handle or zero, indicating that if a dialog box is displayed, it is application modal. If the ulUIParam parameter contains a parent window handle, it is of type HWND (cast to a ULONG_PTR). If no dialog box is displayed during the call, ulUIParam is ignored.

flFlags

Reserved; must be zero.

ulReserved

Reserved; must be zero.

Return value

This function returns one of the following values.

Return codeDescription
MAPI_E_FAILURE

The flFlags parameter is invalid or one or more unspecified errors occurred.

MAPI_E_INSUFFICIENT_MEMORY

There was insufficient memory to proceed. The session was not terminated.

MAPI_E_INVALID_SESSION

An invalid session handle was used for the lhSession parameter. The session was not terminated.

SUCCESS_SUCCESS

The call succeeded and the session was terminated.

 

Requirements

Header

Mapi.h

DLL

Mapi32.dll

See also

Simple MAPI
MAPILogon

 

 

Show: