IMAPIFormMgr::CreateForm

The IMAPIFormMgr::CreateForm method launches a form to create a new message based on that form.

Quick Info

See IMAPIFormMgr : IUnknown1RSJZPE.

 

HRESULT CreateForm(

    ULONG ulUIParam,

 

    ULONG ulFlags,

 

    IMAPIFormInfo pfrminfoToActivate,

 

    REFIID refiidToAsk,

 

    LPVOID FAR * ppvObj

 

   )

 

 

Parameters

ulUIParam

[in] Handle to the parent window for the progress indicator displayed while the form is launched. The ulUIParam parameter is ignored unless the MAPI_DIALOG flag is set in the ulFlags parameter.

ulFlags

[in] Bitmask of flags that controls how the form is launched. The following flag can be set:

MAPI_DIALOG

Displays a user interface to provide status or prompt the user for additional information. If this flag is not set, no user interface is displayed.

pfrminfoToActivate

[in] Pointer to the form information object used to launch the form.

refiidToAsk

[in] Pointer to the interface identifier (IID) for the interface to be returned for the form object created. The refiidToAsk parameter must not be NULL.

ppvObj

[out] Pointer to a pointer to the returned interface.

 

Return Values

S_OK

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

MAPI_E_NO_INTERFACE

The requested interface is not supported by the form object.

 

Remarks

Form viewers call the IMAPIFormMgr::CreateForm method to launch a form to create a new message based on the form. CreateForm launches the form by creating an instance of the form server for that form as described in the given form information object. If required, CreateForm calls IMAPIFormMgr::PrepareForm4MWX_5O to download the form server code to the user s disk.

The pfrminfoToActivate parameter must point to a form information object that has been correctly resolved.

After the form has been launched, the calling form viewer must set up a message using the IPersistMessage20QA6Y interface and can optionally set up a view context for the form. For more information, see Launching a Form ServerJ5PY1N. 

See Also

IMAPIViewContext : IUnknown, IPersistMessage : IUnknown