IMAPIFormContainer::ResolveMessageClass

This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

Resolves a message class to its form in a form container and returns a form information object for that form.

HRESULT ResolveMessageClass(
  LPCSTR szMessageClass,
  ULONG ulFlags,
  LPMAPIFORMINFO FAR * ppforminfo
);

Parameters

  • szMessageClass
    [in] A string that names the message class being resolved. Message class names are always ANSI strings, never Unicode.

  • ulFlags
    [in] A bitmask of flags that controls how the message class is resolved. The following flag can be set:

    • MAPIFORM_EXACTMATCH
      Only message class strings that are an exact match should be resolved.
  • ppforminfo
    [out] A pointer to a pointer to the returned form information object.

Return Value

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

  • MAPI_E_NOT_FOUND
    The message class passed in the szMessageClass parameter does not match the message class for any form in the form container.

Remarks

Client applications call the IMAPIFormContainer::ResolveMessageClass method to resolve a message class to a form within a form container. The form information object returned in the ppforminfo parameter provides further access to the properties of the form with the given message class.

Notes to Callers

To resolve a message class to a form, pass in the name of the message class to be resolved (for example, IPM.HelpDesk.Software). To force the resolution to be exact (that is, to prevent resolution to a base class of the message class), the MAPIFORM_EXACTMATCH flag can be passed in the ulFlags parameter.

The class identifier for the resolved message class is returned as part of the form information object. Do not assume that the class identifier exists in the OLE library until after you call either the IMAPIFormMgr::PrepareForm or IMAPIFormMgr::CreateForm method.

MFCMAPI Reference

For MFCMAPI sample code, see the following table.

File

Function

Comment

FormContainerDlg.cpp

CFormContainerDlg::OnResolveMessageClass

MFCMAPI uses the IMAPIFormContainer::ResolveMessageClass method to locate a form that is associated with a message class.

See Also

Reference

IMAPIFormInfo : IMAPIProp

IMAPIFormMgr::CreateForm

IMAPIFormMgr::PrepareForm

IMAPIFormContainer : IUnknown