Send Feedback

The FormFactory function must be implemented to return a reference to the IFormProvider interface, which allows the Microsoft Messaging Application to create the plug-in's custom read and compose forms. The FORMFACTORYFUNC type defines a pointer to this function.

Note   The FormFactory function is available only on Pocket PC 2002 and Smartphone 2002. For Windows Mobile 2003 and later, use the FormFactoryEx function.


HRESULT FormFactory (
  LPCWSTR pszMsgClass,
  IFormProvider ** ppObj,


  • pszMsgClass
    [in] Reference to the message's message class property.
  • ppObj
    [out] Reference to the plug-in's IFormProvider interface. Returns NULL if pszMsgClass is valid but the object cannot be created.

Return Values

This function returns an appropriate HRESULT value, such as the following:

  • S_OK
    The function successfully returned a reference to the IFormProvider interface.
    The input parameter is NULL.
    A memory allocation failed.


Pocket PC: Pocket PC 2002 and later
Smartphone: Smartphone 2002 and later
OS Versions: Windows CE 3.0 and later
Header: cemapi.h
Library: cemapi.lib

See Also

MAPI Functions | Messaging

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.