Published: July 16, 2012
Registers a transport provider's preprocessor function (a function that conforms to the PreprocessMessage prototype).
The IMAPISupport::RegisterPreprocessor method is implemented for transport provider support objects only. Transport providers call RegisterPreprocessor to register a preprocessor function (a function that conforms to the PreprocessMessage prototype). A preprocessor function must be registered before the MAPI spooler can call it.
The lpszPreprocess, lpszRemovePreprocessInfo, and lpszDLLName parameters should all point to strings that can be used in conjunction with calls to the Win32 GetProcAddress function, allowing the preprocessor's DLL entry point to be called correctly.
Calls to preprocessors are specific to transport provider order. This means that if another transport provider ahead of your provider is able to handle a message, your preprocessor function will not be called for that message. Your preprocessor function will be called only for messages that you will handle.
You can write preprocessor functions to handle either a specific identifier stored in a MAPIUID structure or a type of address. If you specify both a MAPIUID structure in the lpMuid parameter and an address type in the lpszAdrType parameter, your function will be called for message recipients that match either the MAPIUID or the address type. If lpMuid is NULL and lpszAdrType is non-NULL, your function will be called only for recipients that have an address that matches the type pointed to by lpszAdrType. If lpMuid is non-NULL and lpszAdrType is NULL, your function will be called for recipients that match MAPIUID, regardless of their address type. If both are NULL, your function is called for all recipients of the message.