IClassDef::CreateInterfaceDef

See Also

The CreateInterfaceDef method creates a new interface definition, and adds the interface to the collection of interfaces that are implemented by the class.

HRESULT CreateInterfaceDef(
VARIANT sObjId,
BSTR Name,
VARIANT sIID,
IInterfaceDef *pIAncestor,
BSTR Flags,
IInterfaceDef **ppIInterfaceDef
);

Parameters

sIObjId

[in]
The object identifier to be assigned to the new interface definition object. If this parameter is set to OBJID_NULL, the Repository assigns an object identifier for you.

Name

[in]
The name of the interface that is to be created.

sIID

[in]
The global identifier associated with the signature for this interface. If there is none, set this parameter to zero.

*pIAncestor

[in]
The interface pointer to the base interface from which the interface being added is derived.

Flags

[in]
If the interface that you are adding is the default interface for the class, pass in the string "Default". Otherwise, pass in a null string.

*pplInterfaceDef

[out]
The interface pointer for the new interface.

Return Value

S_OK

The method completed successfully.

Error

Values

This method failed to complete successfully.