IAddrBook::RecipOptions

The IAddrBook::RecipOptions method displays a dialog box showing the recipient option properties.

Quick Info

See IAddrBook : IMAPIPropG38_SD.

 

HRESULT RecipOptions(

    ULONG ulUIParam,

 

    ULONG ulFlags,

 

    LPADRENTRY lpRecip

 

   )

 

 

Parameters

ulUIParam

[in] Handle of the parent window for the dialog box.

ulFlags

Reserved; must be zero.

lpRecip

[in] Pointer to the ADRENTRYWLHOWG structure that describes the recipient whose options are to be displayed.

 

Return Values

S_OK

The options for the specified recipient were successfully displayed.

MAPI_W_ERRORS_RETURNED

There are no recipient options for this recipient. When this warning is returned, the call should be handled as successful. To test for this warning, use the HR_FAILED macro. For more information on using the HR_FAILED macro, see Using Macros for Error Handling3AFTHZP.

 

Remarks

Clients and service providers call the IAddrBook::RecipOptions method to display a dialog box to allow a user to set properties that control the sending and receiving of messages for a particular recipient and address type.

To locate the appropriate properties to be displayed, MAPI first scans through the SPropValue81C9._8 structure array in the ADRENTRYWLHOWG structure to find the PR_ENTRYID2JH9H8T and PR_ADDRTYPE7C7E4S properties. MAPI then determines the transport provider, if any, that has registered options for the particular address type. If there is an appropriate transport provider, MAPI calls the provider s function that is based on the OPTIONCALLBACK1OPVZTA prototype to retrieve the properties.

To retrieve the set of default recipient options without presenting a dialog box to the user, clients or service providers should call the IAddrBook::QueryDefaultRecipOpt247NZ8O method.

If any recipient options are changed on a RecipOptions call, MAPI frees the old SPropValue81C9._8 structures for those options within the recipient s ADRENTRY structure and allocates new ones.

If there are no recipient options available for the address type indicated in the lpRecip parameter, the warning MAPI_W_ERRORS_RETURNED is returned, indicating there was an error returned for the RecipOptions call. Calling the IMAPIProp::GetLastError6IMPBE method returns a text string describing the warning.

Transport providers can also register message options that apply to all of recipients. For more information on registering options, see Implementing Message and Recipient Options with Transport Providers3RCY_PK.

See Also

ADRENTRY, IAddrBook::QueryDefaultRecipOpt, IMAPISession::MessageOptions, IMAPISession::QueryDefaultMessageOpt, SPropValue