Platform SDK: MAPI |
The IXPLogon::RegisterOptions method returns the options that are supported by the transport provider for an address type to the MAPI spooler.
See IXPLogon : IUnknown.
HRESULT RegisterOptions( ULONG FAR * lpulFlags, ULONG FAR * lpcOptions, LPOPTIONDATA FAR * lppOptions );
If anything other than S_OK is returned, the provider is logged off.
The MAPI spooler calls the IXPLogon::RegisterOptions method to get the options for messages and recipients supported by a transport provider for a particular messaging address type. These options are then registered with MAPI so they can be displayed in options dialog boxes.
RegisterOptions returns in the lppOptions parameter pointers to one or two OPTIONDATA structures for each supported messaging address type, depending on whether the provider is registered for both recipient and message options, recipient options only, or message options only. If a provider is registered for both option types, RegisterOptions writes one structure containing option information for recipients and one containing option information for messages. For each structure, the ulFlags member indicates whether the options apply to a recipient or a message.
For an example of the use of OPTIONDATA, consider a transport provider that handles recipients for both Microsoft® Mail Server and Microsoft® Mail Server for the Macintosh. If the provider is registered for both recipient and message options, it provides two pairs of OPTIONDATA structures, one pair for each platform. The MAPI spooler can use these structures to determine what options are valid for each platform and to allow users to change settings for those options.
MAPI also uses the options registered on the RegisterOptions call to resolve message and recipient options. MAPI does so by using a callback function that the transport provider supplies; this callback function, declared with the OPTIONCALLBACK function prototype defined in MAPIDEFS.H, receives a wrapped IMAPIProp interface that manages the provider's message and recipient properties.
The transport provider is responsible for memory allocated for any OPTIONDATA structures during this call. The provider should free the memory upon logoff.