IClassDef::AddInterface

Meta Data Services Programming

Meta Data Services Programming

IClassDef::AddInterface

The AddInterface method adds an existing interface to the collection of interfaces that are implemented by a particular class.

HRESULT AddInterface(     IInterfaceDef  *plInterfaceDef,
    BSTR             Flags
);

Parts

plInterfaceDef

[in]
The interface pointer for the interface that is to be added to the collection of interfaces implemented by this class.

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.

Return Value

S_OK

The method completed successfully.

Error Values

This method failed to complete successfully.

Remarks

When you indicate that an interface is the default interface for a class, you are actually setting the value of the ImplementsOptions annotational property on the Class_Implements_Interface relationship to TRUE.

See Also

IClassDef Interface

IInterfaceDef Interface