IMAPISupport::RegisterPreprocessor
The IMAPISupport::RegisterPreprocessor
method registers a transport provider s preprocessor function, a function that
conforms to the PreprocessMessage prototype.
Quick Info
See IMAPISupport
: IUnknown.
HRESULT RegisterPreprocessor(
|
LPMAPIUID lpMuid,
|
|
|
LPTSTR lpszAdrType, |
|
|
LPTSTR lpszDLLName, |
|
|
LPSTR lpszPreprocess, |
|
|
LPSTR lpszRemovePreprocessInfo, |
|
|
ULONG ulFlags |
|
|
) |
|
Parameters
lpMuid
[in] Pointer
to the MAPIUID
structure containing the identifier that the preprocessor function handles. The
lpMuid parameter can be NULL.
lpszAdrType
[in] Pointer
to the address type for the messages the function operates on, such as FAX,
SMTP, or X500. The lpszAdrType parameter can be NULL.
lpszDLLName
[in] Pointer
to the name of the dynamic-link library (DLL) containing the entry point for
the preprocessor function.
lpszPreprocess
[in] Pointer
to the name of the preprocessor function. The lpszPreprocess parameter
can be NULL.
lpszRemovePreprocessInfo
[in] Pointer
to the name of the function that removes preprocessor information, a function
that conforms to the RemovePreprocessInfo prototype. The lpszRemovePreprocessInfo
parameter can be NULL.
ulFlags
Reserved;
must be zero.
Return Values
S_OK
The
preprocessor function was successfully registered.
Remarks
The IMAPISupport::RegisterPreprocessor
method is implemented for transport provider support objects only. Transport
providers call the IMAPISupport::RegisterPreprocessor method to register
a preprocessor function a function
that conforms to the PreprocessMessage prototype. A preprocessor
function must be registered before it can be called by the MAPI spooler.
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.
Notes to Callers
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 get called for that message. Your
preprocessor function will only be called for messages that you will handle.
Preprocessor
functions can be written 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 lpszAdrType, 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 with 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.
See Also