IdmaClassDescription

Class Descriptions are DMA objects that provide a meta-data description and a constructor for a class of DMA objects.

The IdmaClassDescription interface provides specialized methods supported by Class Description objects. The interface allows constructing an object of the described class, and testing if an object is in a class.

IdmaClassDescription::CreateInstance

Support for this method is optional.

Syntax
DmaRC IdmaClassDescription::CreateInstance (
DMA_REFIID riid,
pDmapv ppIObject)

Parameters

Name

Mode

Description

riid

input

Interface Identifier for the desired interface on resulting object.

ppIObject

output

Returns a reference to the requested interface for the object created, which will be NULL if unsuccessful.

Description

Creates a new transient object described by this Class Description object. The new object’s properties will be assigned default values, and can be changed using the IdmaEditProperties interface. The new object may be made persistent using the IdmaConnection::ExecuteChange method.

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.

Return Values

Name

Description

DMARC_BAD_INTERFACE

(E_NOINTERFACE) The requested interface is not supported by this object.

DMARC_BAD_PARAMETER

(E_INVALIDARG) Invalid input parameter.

DMARC_NOT_SUPPORTED

This method is not supported in the context of this session or object.

DMARC_OK

(S_OK) Success.

IdmaClassDescription::IsOfClass

This method must be supported in every implementation of this interface.

Syntax
DmaRC IdmaClassDescription::IsOfClass (
pDmaId pClassId,
pDmaBoolean pbIsOfClass)

Parameters

Name

Mode

Description

pClassId

input

A pointer to the identifier of the class.

pbIsOfClass

output

Returns DMA_TRUE if the object conforms to the selected Class Id.

Description

Returns DMA_TRUE if and only if the described class conforms to the class specified by pClassId. To be conformant, the specified class ID must be an identifier for a class for which the described class is a subclass. All DMA Class Description objects should return DMA_TRUE if the specified class ID is dmaClass_DMA. (See also IdmaObject::IsOfClass for a similar method on any DMA object).

Return Values

Name

Description

DMARC_BAD_CLASSID

The supplied identifier does not reference an available class of object.

DMARC_BAD_PARAMETER

(E_INVALIDARG) Invalid input parameter.

DMARC_OK

(S_OK) Success.