The OPTIONCALLBACK function prototype defines a callback function that MAPI calls to retrieve a wrapped IMAPIProp interface that manages a transport provider's properties.
Header file: | MAPISPI.H |
Defined function implemented by: | Transport providers |
Defined function called by: | MAPI |
SCODE OPTIONCALLBACK(
HINSTANCE hInst,
LPMALLOC lpMalloc,
ULONG ulFlags,
ULONG cbOptionData,
LPBYTE lpbOptionData,
LPMAPISUP lpMAPISup,
LPMAPIPROP lpDataSource,
LPMAPIPROP FAR * lppWrappedSource,
LPMAPIERROR FAR * lppMAPIError
);
MAPI calls the transport provider's OPTIONCALLBACK function if a transport provider has previously registered message options with the IXPLogon::RegisterOptions method. Transport providers that do not define message or recipient options do not need to implement this callback function.
MAPI passes a wrapped IMAPIProp : IUnknown interface in the lpDataSource parameter. The transport provider should build a display table, set any properties, and then pass that display table back to MAPI in a wrapped IMAPIProp interface in the lppWrappedSource parameter. MAPI uses this IMAPIProp interface to display properties in the message or recipient options dialog box that is displayed to users. When users make selections in the dialog box resulting in a call to the IMAPIProp::OpenProperty method for the PR_DETAILS_TABLE property, the transport provider gets the call and should display the display table. The transport provider must call the IMAPIProp::SetProps method followed by the IMAPIProp::SaveChanges method on any changes the user made to the display table.
For more information on how to create display tables, see Display Tables.