IMAPISupport::CreateOneOff

The IMAPISupport::CreateOneOff method creates an entry identifier for a one-off address.

Quick Info

See IMAPISupport : IUnknownA6YDUA.

HRESULT CreateOneOff(

    LPTSTR lpszName,

 

    LPTSTR lpszAdrType,

 

    LPTSTR lpszAddress,

 

    ULONG ulFlags,

 

    ULONG FAR * lpcbEntryID,

 

    LPENTRYID FAR * lppEntryID

 

   )

 

 

Parameters

lpszName

[in] Pointer to the display name of the recipient, the PR_DISPLAY_NAME property. The lpszName parameter can be NULL.

lpszAdrType

[in] Pointer to the address type of the recipient, such as FAX, SMTP, or X500. The lpszAdrType parameter cannot be NULL.

lpszAddress

[in] Pointer to the messaging address of the recipient. The lpszAddress parameter cannot be NULL.

ulFlags

[in] Bitmask of flags that affects the one-off recipient. The following flags can be set:

MAPI_SEND_NO_RICH_INFO

The recipient cannot handle formatted message content. If MAPI_SEND_NO_RICH_INFO is set, MAPI sets the recipient s PR_SEND_RICH_INFO8AH081 property to FALSE. If MAPI_SEND_NO_RICH_INFO is not set, MAPI sets this property to TRUE unless the recipient s messaging address pointed to by lpszAddress is interpreted to be an Internet address. In this case, MAPI sets PR_SEND_RICH_INFO to FALSE.

MAPI_UNICODE

The display name, address type, and address are in Unicode format. If the MAPI_UNICODE flag is not set, these strings are in ANSI format.

lpcbEntryID

[out] Pointer to the count of bytes in the entry identifier pointed to by the lppEntryID parameter.

lppEntryID

[out] Pointer to a pointer to the entry identifier for the one-off recipient.

 

Return Values

S_OK

The one-off entry identifier was successfully created.

 

Remarks

The IMAPISupport::CreateOneOff method is implemented for all service provider support objects. Service providers call the IMAPISupport::CreateOneOff method to create an entry identifier for a one-off recipient, a recipient that does not belong to any of the containers from any of the currently loaded address book providers.

Notes to Callers

When finished using the entry identifier returned by CreateOneOff, free the memory allocated for the entry identifier by using the MAPIFreeBuffer16U06F function.

Notes to Transport Providers

Support the Transport Neutral Encapsulation Format, or TNEF, and use the value of the PR_SEND_RICH_INFO8AH081 property to determine whether or not to use TNEF when transporting a message. Not supporting TNEF or not sending a message in this format when requested can be a problem for form-based clients or clients that require custom MAPI properties. This is because TNEF is typically used to send custom properties for custom message classes.

See Also

MAPIFreeBuffer