The PreprocessMessage function prototype defines a function that preprocesses message contents or the format of a message.
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
);
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 PreprocessMessage – based function.
Before the MAPI spooler can call a PreprocessMessage function, the transport provider must have registered the function in a call to the IMAPISupport::RegisterPreprocessor 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.
Preprocessor Functions, IAddrBook : IMAPIProp, IMAPIFolder : IMAPIContainer, IMAPISupport : IUnknown