IMsgStore::StoreLogoff

The IMsgStore::StoreLogoff method enables the orderly logoff of the message store.

Quick Info

See IMsgStore : IMAPIProp9A02HD.

 

HRESULT StoreLogoff(

    ULONG FAR * lpulFlags

 

   )

 

 

Parameters

lpulFlags

[in, out] Bitmask of flags that controls logoff from the message store. On input, all flags set for this parameter are mutually exclusive; a caller must specify only one flag per call. The following flags are valid on input:

LOGOFF_ABORT

Any transport provider activity for this message store should be stopped before logoff. Control is returned to the caller after activity is stopped. If any transport provider activity is taking place, the logoff does not occur and no change in the behavior of the MAPI spooler or transport providers occurs. If transport provider activity is quiet, the MAPI spooler releases the store.

LOGOFF_NO_WAIT

The message store should not wait for messages from transport providers before closing. Outbound messages that are ready to be sent are sent. If this store contains the default Inbox, any in-process messages are received, and then further reception is disabled. When all activity is completed, the MAPI spooler releases the store, and control is returned to the caller immediately.

LOGOFF_ORDERLY

The message store should not wait for information from transport providers before closing. Messages currently being processed are completed, but no new messages are processed. When all activity is completed, the MAPI spooler releases the store, and control is returned to the store provider immediately.

LOGOFF_PURGE

The logoff should work the same as if the LOGOFF_NO_WAIT flag is set, but that either IXPLogon::FlushQueues_520E_ or IMAPIStatus::FlushQueues9QD4LT for the appropriate transport providers should be called. The LOGOFF_PURGE flag returns control to the caller after completion.

LOGOFF_QUIET

If any transport provider activity is taking place, the logoff should not occur.

 

The following flags are valid on output:

LOGOFF_INBOUND

Inbound messages are currently arriving.

LOGOFF_OUTBOUND

Outbound messages are in the process of being sent.

LOGOFF_OUTBOUND_QUEUE

Outbound messages are pending, that is, they are in the Outbox.

 

Return Value

S_OK

The logoff completed successfully.

 

Remarks

The IMsgStore::StoreLogoff method exerts control over the interaction of the message store and transport providers during the logoff process. Calling StoreLogoff is valid only for message stores that are being used by only the caller. When two clients, for example, are using the same message store and one of them calls StoreLogoff, the message store is immediately released and control is returned to the calling client.

Notes to Implementers

Save the flags that are passed to StoreLogoff and pass them when you call IMAPISupport::StoreLogoffTransportsE6DYO4. Do not call StoreLogoffTransports until the message store s reference count drops to zero. Multiple calls to StoreLogoffTransports simply overwrite the saved flags.

If no call has been made to StoreLogoff before the message store s reference count reaches zero, set the LOGOFF_ABORT flag in the ulFlags parameter that you pass to StoreLogoffTransports.

See Also

IMAPIStatus::FlushQueues, IMAPISupport::StoreLogoffTransports, IXPLogon::FlushQueues