This interface provides access to object creation services of a DMA System object, DocSpace object or Scope object.
This method must be supported in every implementation of this interface.
Syntax
DmaRC IdmaObjectFactory::CreateObject (
pDmaId pClassId,
DMA_REFIID riid,
pDmapv ppIObject)
Parameters
Name | Mode | Description |
pClassId | input | A pointer to the identifier of the class of object to be created. This identifier may be well-known or obtained from the meta-data. |
riid | input | Interface Identifier for the desired interface on resulting object. |
ppIObject | output | Returns a pointer for the requested interface for the object created, which will be NULL if unsuccessful. |
This will create a new object of the class indicated by pClassId in the client's process space. The object’s properties will be set with default values, and may be changed using the IdmaEditProperties interface.
If the returned object does not support the interface specified by riid, the operation will fail and the result code DMARC_BAD_INTERFACE will be returned. In case the operation is successful, the returned interface must be released using the method IUnknown::Release.
The method gives gives DMARC_NOT_CREATABLE errors for objects which are inappropriate to generate from the object supporting the method. For example, a System object will not support creating independently persistable objects.
Return Values
Name | Description |
DMARC_BAD_CLASSID | The supplied identifier does not reference an available class of object. |
DMARC_BAD_INTERFACE | (E_NOINTERFACE) The requested interface is not supported by this object. |
DMARC_BAD_PARAMETER | (E_INVALIDARG) Invalid input parameter. |
DMARC_NOT_CREATABLE | Creation of objects of the specified class is not supported. |
DMARC_OK | (S_OK) Success. |