Platform SDK: MAPI |
The IMAPIFormFactory::CreateClassFactory method returns a class factory object for the form.
See IMAPIFormFactory : IUnknown.
HRESULT CreateClassFactory( REFCLSID clsidForm, ULONG ulFlags, LPCLASSFACTORY FAR * lppClassFactory );
Form viewers call the IMAPIFormFactory::CreateClassFactory method to obtain a class factory for a specific form. The class factory is used to create instances of a form that handles messages of a specific class and to control the access to these instances.
The CreateClassFactory method is called by form viewers to obtain a class factory object for form servers that implement multiple message classes. This method receives a class identifier (CLSID) as a parameter. Based on that parameter, this method can determine the specific kind of class factory object to return.
You can return from your CreateClassFactory implementation the same class factory object on multiple calls for the same class identifier. Creating a new class factory instance is not required.
You can have a single class factory implementation that creates appropriate class factory instances on demand, or multiple class factory implementations, one for each message class.