ImplementsHelper Structure

Supports the WRL infrastructure and is not intended to be used directly from your code.

Syntax

template <typename RuntimeClassFlagsT, typename ILst, bool IsDelegateToClass>
friend struct Details::ImplementsHelper;

Parameters

RuntimeClassFlagsT
A field of flags that specifies one or more RuntimeClassType enumerators.

ILst
A list of interface IDs.

IsDelegateToClass
Specify true if the current instance of Implements is a base class of the first interface ID in ILst; otherwise, false.

Remarks

Helps implement the Implements structure.

This template traverses a list of interfaces and adds them as base classes, and as information necessary to enable QueryInterface.

Members

Protected Methods

Name Description
ImplementsHelper::CanCastTo Gets a pointer to the specified interface ID.
ImplementsHelper::CastToUnknown Gets a pointer to the underlying IUnknown interface for the current Implements structure.
ImplementsHelper::FillArrayWithIid Inserts the interface ID specified by the current zeroth template parameter into the specified array element.
ImplementsHelper::IidCount Holds the number of implemented interface IDs in the current Implements object.

Inheritance Hierarchy

ImplementsHelper

Requirements

Header: implements.h

Namespace: Microsoft::WRL::Details

ImplementsHelper::CanCastTo

Supports the WRL infrastructure and is not intended to be used directly from your code.

HRESULT CanCastTo(
   REFIID riid,
   _Deref_out_ void **ppv
);

HRESULT CanCastTo(
   _In_ const IID &iid,
   _Deref_out_ void **ppv
);

Parameters

riid
Reference to an interface ID.

ppv
If this operation is successful, a pointer to the interface specified by riid or iid.

iid
Reference to an interface ID.

Return Value

S_OK if successful; otherwise, an HRESULT that indicates the error.

Remarks

Gets a pointer to the specified interface ID.

ImplementsHelper::CastToUnknown

Supports the WRL infrastructure and is not intended to be used directly from your code.

IUnknown* CastToUnknown();

Return Value

Pointer to the underlying IUnknown interface.

Remarks

Gets a pointer to the underlying IUnknown interface for the current Implements structure.

ImplementsHelper::FillArrayWithIid

Supports the WRL infrastructure and is not intended to be used directly from your code.

void FillArrayWithIid(
   _Inout_ unsigned long *index,
   _Inout_ IID* iids) throw();

Parameters

index
A zero-based index that indicates the starting array element for this operation. When this operation completes, index is incremented by 1.

iids
An array of type IIDs.

Remarks

Inserts the interface ID specified by the current zeroth template parameter into the specified array element.

ImplementsHelper::IidCount

Supports the WRL infrastructure and is not intended to be used directly from your code.

static const unsigned long IidCount;

Remarks

Holds the number of implemented interface IDs in the current Implements object.