PreprocessMessage 

The PreprocessMessage function prototype defines a function that preprocesses message contents or the format of a message.

Quick Info

Header file:

MAPISPI.H

Defined function implemented by:

Transport providers

Defined function called by:

MAPI spooler

 

HRESULT PreprocessMessage(

    LPVOID lpvSession,

 

    LPMESSAGE lpMessage,

 

    LPADRBOOK lpAdrBook,

 

    LPMAPIFOLDER lpFolder,

 

    LPALLOCATEBUFFER AllocateBuffer,

 

    LPALLOCATEMORE AllocateMore,

 

    LPFREEBUFFER FreeBuffer,

 

    ULONG FAR * lpcOutbound,

 

    LPMESSAGE FAR * FAR * lpppMessage,

 

    LPADRLIST FAR * lppRecipList

 

   );

 

 

Parameters

lpvSession

[in] Pointer to the session to be used.

lpMessage

[in] Pointer to the message to be preprocessed.

lpAdrBook

[in] Pointer to the address book from which the user should select recipients for the message.

lpFolder

[in, out] Pointer to a folder. On input, the lpFolder parameter points to the folder that contains messages to be preprocessed. On output, lpFolder points to the folder where preprocessed messages have been placed.

lpAllocateBuffer

[in] Pointer to the MAPIAllocateBuffer1MW3BAZ function, to be used to allocate memory.

lpAllocateMore

[in] Pointer to the MAPIAllocateMoreB1SGX_ function, to be used to allocate additional memory where required.

lpFreeBuffer

[in] Pointer to the MAPIFreeBuffer16U06F function, to be used to free memory.

lpcOutbound

[out] Pointer to the number of messages in the array pointed to by the lpppMessage parameter.

lpppMessage

[out] Pointer to a pointer to an array of pointers to preprocessed or otherwise generated messages.

lppRecipList

[out] Pointer to an optional returned ADRLIST16760YG structure, listing preprocessor-detected recipients for which the message is undeliverable. For more information on the contents of this list, see the IMAPISupport::StatusRecips0BDBIL method.

 

Remarks

A transport-provider message preprocessor can present a progress indicator during message preprocessing. However, it should never present a dialog box requiring user interaction during message preprocessing.

When a preprocessor adds large amounts of data to an outbound message, certain procedures should be followed. This type of message can be stored in a server-based message store, causing the preprocessor to access a remote store, a time-consuming procedure. To avoid having to do so, the preprocessor should have an option that enables it to store data that takes a large amount of space in a local message store and to provide a reference to that local store in the message.

The preprocessor should not release any of the objects originally passed to the function based on PreprocessMessage.

Before the MAPI spooler can call a PreprocessMessage function, the transport provider must have registered the function in a call to the IMAPISupport::RegisterPreprocessor3EQ._.U method. After calling a PreprocessMessage function, the spooler cannot continue submitting a message until the function returns.

The MAPI spooler owns the task of submitting messages. This means the original message is never placed in an array of message pointers and that a call to the SubmitMessage methods is never required.

See Also

IAddrBook : IMAPIPropG38_SD, IMAPIFolder : IMAPIContainer161AJWS, IMAPISupport : IUnknownA6YDUA