OPTIONCALLBACK

The OPTIONCALLBACK function prototype defines a callback function that MAPI calls to retrieve a wrapped IMAPIProp interface that manages a transport provider s properties.

Quick Info

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

 

   );

 

 

Parameters

hInst

[in] The hinstance value for this transport provider s dynamic link library (DLL) as returned from the LoadLibrary function call made by MAPI.

lpMalloc

[in] Pointer to a memory allocator object exposing the OLE IMalloc interface. The transport provider may need to use this allocation method when working with certain interfaces such as IStream.

ulFlags

[in] Bitmask of flags that controls what options are processed. The following flags can be set:

OPTION_TYPE_MESSAGE

Message options.

OPTION_TYPE_RECIPIENT

Recipient options.

cbOptionData

[in] Size, in bytes, of the data pointed to by the lpbOptionData parameter.

lpbOptionData

[in] Pointer to an OPTIONDATA structure containing option data for the recipient or message. This OPTIONDATA structure was passed in the call to the IXPLogon::RegisterOptionsD9M544 method that registered the options.

lpMAPISup

[in] Pointer to a MAPI support object the provider can use to call the methods of the IMAPISupport : IUnknownA6YDUA interface.

lpDataSource

[in] Pointer to an IMAPIProp : IUnknownHP08HX interface that MAPI wraps for the transport provider s use.

lppWrappedSource

[out] Pointer to a pointer to the wrapped IMAPIProp interface returned by the transport provider.

lppMAPIError

[out] Pointer to a pointer to the returned MAPIERROR4GS6AI structure, if any, containing version, component, and context information for the error.

 

Return Values

S_OK

The call succeeded and has returned the expected value or values.

 

Remarks

MAPI calls the transport provider s OPTIONCALLBACK function if a transport provider has previously registered message options with the IXPLogon::RegisterOptionsD9M544 method. Transport providers that do not define message or recipient options do not need to implement this callback function.

MAPI passes a wrapped IMAPIProp : IUnknownHP08HX 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::OpenPropertyLFSSYS 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::SetPropsXCFLAC method followed by the IMAPIProp::SaveChanges21IFXQ method on any changes the user made to the display table.

For more information on how to create display tables, see Display Tables12983_W.