Important:
This is retired content. 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 content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
4/8/2010

The FormFactoryfunction must be implemented to return a reference to the IFormProviderinterface, which allows the Microsoft Messaging Application to create the plug-in's custom read and compose forms. The FORMFACTORYFUNCtype defines a pointer to this function.

Note:
The FormFactoryfunction is available only on Pocket PC 2002 and Smartphone 2002. For Windows Mobile 2003 and later, use the FormFactoryExfunction.

Syntax

HRESULT FormFactory (
  LPCWSTR 
pszMsgClass,
  

IFormProvider ** 
ppObj,
);

Parameters

pszMsgClass

[in] Reference to the message's message class property.

ppObj

[out] Reference to the plug-in's IFormProviderinterface. Returns NULLif pszMsgClassis valid but the object cannot be created.

Return Value

This function returns an appropriate HRESULTvalue, such as the following:

S_OK

The function successfully returned a reference to the IFormProviderinterface.

MAPI_E_INVALID_PARAMETER

The input parameter is NULL.

MAPI_E_NOT_ENOUGH_MEMORY

A memory allocation failed.

Requirements

Header cemapi.h
Library cemapi.lib
Windows Embedded CE Windows CE 3.0 and later
Windows Mobile Pocket PC 2002 and later, Smartphone 2002 and later

See Also

Reference

MAPI Functions

Other Resources

Messaging