IProvideMultipleClassInfo

IProvideMultipleClassInfo


IProvideMulitpleClassInfo, an extension of the IProvideClassInfo2 interface, provides access to the type information of the default interfaces that describe an extended object.

A container typically implements an extender object to add properties, methods, and events to an existing object, the extendee. This interface can be implemented to return the type information of the extender (as index 0) and the type information of the extendee (as index 1). If this extendee is itself an extension, this interface must also return the type information of what that object extends (as index 2 in this example). This process continues for all extended objects until the base object (the innermost object being extended) is reached.

Only the default interfaces are part of the logical merging. Other interfaces are simply ignored; nothing can be inferred by their presence or absence.

This interface is typically implemented by an Active Scripting host and requested by an Active Scripting engine.

Methods

The IProvideMultipleClassInfo interface consists of two methods (listed in vtable order):

IProvideMultipleClassInfo::GetMultiTypeInfoCount

HRESULT IProvideMultipleClassInfo::GetMultiTypeInfoCount(
    [out] ULONG *pcti
);

Returns the number of type information interfaces that make up this composite default interface.

pcti
Number of type information interfaces making up this composite default interface. The information for a particular interface can then be obtained through GetInfoOfIndex, passing in a number greater than or equal to zero, and less than pcti.

IProvideMultipleClassInfo::GetInfoOfIndex

HRESULT IProvideMultipleClassInfo::GetInfoOfIndex(
    [in]  ULONG       iti,
    [in]  DWORD       dwMCIFlags,
    [out] ITypeInfo   **pptiCoClass,
    [out] DWORD       *pdwTIFlags,
    [out] ULONG       *pcdispidReserved,
    [out] IID         *piidPrimary,
    [out] IID         *piidSource
);

Returns information associated with a particular contributing default interface.

iti
Index of the type information for which you want to obtain information. Index 0 is the default interface of the extender object; index *pcti-1 is the index of the base object.
dwMCIFlags
Bit field indicating which [out] parameters are being requested. Indicating a particular flag below will result in the appropriate information being assigned to the associated [out] parameter. dwMCIFlags be one of the following flags:
MULTICLASSINFO_GETTYPEINFO Indicates a request for pptiCoClass information.
MULTICLASSINFO_GETNUMRESERVEDDISPIDS Indicates a request for pcdispidReserved and pdwTIFlags information.
MULTICLASSINFO_GETIIDPRIMARY Indicates a request for piidPrimary information.
MULTICLASSINFO_GETIIDSOURCE Indicates a request for piidSource information.
pptiCoClass
CoClass type information for the requested contributor. Can be the following:
TIFLAGS_EXTENDDISPATCHONLY Indicates that pptiCoClass should be filled in.
pdwTIFlags
Bit field indicating some information about the returned type information.
pcdispidReserved
Number of DISPIDs the [default] interface of pptiCoClass reserves for its own use. This number can be used to calculate the amount to offset DISPIDs in the reserved range implemented by the object this class is extending.
piidPrimary
The IID of the primary interface for the requested contributor.
piidSource
The IID of the default source interface for the requested contributor.

© 1997 Microsoft Corporation. All rights reserved. Terms of Use.