| description | Learn more about: ChainInterfaces Structure | ||||||
|---|---|---|---|---|---|---|---|
| title | ChainInterfaces Structure | ||||||
| ms.date | 10/03/2018 | ||||||
| ms.topic | reference | ||||||
| f1_keywords |
|
||||||
| helpviewer_keywords |
|
||||||
| ms.assetid | d7415b59-5468-4bef-a3fd-8d82b12f0e9c |
Specifies verification and initialization functions that can be applied to a set of interface IDs.
template <
typename I0,
typename I1,
typename I2 = Details::Nil,
typename I3 = Details::Nil,
typename I4 = Details::Nil,
typename I5 = Details::Nil,
typename I6 = Details::Nil,
typename I7 = Details::Nil,
typename I8 = Details::Nil,
typename I9 = Details::Nil
>
struct ChainInterfaces : I0;
template <
typename DerivedType,
typename BaseType,
bool hasImplements,
typename I1,
typename I2,
typename I3,
typename I4,
typename I5,
typename I6,
typename I7,
typename I8,
typename I9
>
struct ChainInterfaces<
MixIn<
DerivedType,
BaseType,
hasImplements
>, I1, I2, I3, I4, I5, I6, I7, I8, I9
>;I0
(Required) Interface ID 0.
I1
(Required) Interface ID 1.
I2
(Optional) Interface ID 2.
I3
(Optional) Interface ID 3.
I4
(Optional) Interface ID 4.
I5
(Optional) Interface ID 5.
I6
(Optional) Interface ID 6.
I7
(Optional) Interface ID 7.
I8
(Optional) Interface ID 8.
I9
(Optional) Interface ID 9.
DerivedType
A derived type.
BaseType
The base type of a derived type.
hasImplements
A Boolean value that if true, means you can't use a MixIn structure with a class that does not derive from the Implements stucture.
| Name | Description |
|---|---|
| ChainInterfaces::CanCastTo | Indicates whether the specified interface ID can be cast to each of the specializations defined by the ChainInterface template parameters. |
| ChainInterfaces::CastToUnknown | Casts the interface pointer of the type defined by the I0 template parameter to a pointer to IUnknown. |
| ChainInterfaces::FillArrayWithIid | Stores the interface ID defined by the I0 template parameter into a specified location in a specified array of interface IDs. |
| ChainInterfaces::Verify | Verifies that each interface defined by template parameters I0 through I9 inherits from IUnknown and/or IInspectable, and that I0 inherits from I1 through I9. |
| Name | Description |
|---|---|
| ChainInterfaces::IidCount | The total number of interface IDs contained in the interfaces specified by template parameters I0 through I9. |
I0
ChainInterfaces
Header: implements.h
Namespace: Microsoft::WRL
Indicates whether the specified interface ID can be cast to each of the specializations defined by the non-default template parameters.
__forceinline bool CanCastTo(
REFIID riid,
_Deref_out_ void **ppv
);riid
An interface ID.
ppv
A pointer to the last interface ID that was cast successfully.
true if all the cast operations succeeded; otherwise, false.
Casts the interface pointer of the type defined by the I0 template parameter to a pointer to IUnknown.
__forceinline IUnknown* CastToUnknown();A pointer to IUnknown.
Stores the interface ID defined by the I0 template parameter into a specified location in a specified array of interface IDs.
__forceinline static void FillArrayWithIid(
_Inout_ unsigned long &index,
_In_ IID* iids
);index
Pointer to an index value into the iids array.
iids
An array of interface IDs.
The total number of interface IDs contained in the interfaces specified by template parameters I0 through I9.
static const unsigned long IidCount = Details::InterfaceTraits<I0>::IidCount + Details::InterfaceTraits<I1>::IidCount + Details::InterfaceTraits<I2>::IidCount + Details::InterfaceTraits<I3>::IidCount + Details::InterfaceTraits<I4>::IidCount + Details::InterfaceTraits<I5>::IidCount + Details::InterfaceTraits<I6>::IidCount + Details::InterfaceTraits<I7>::IidCount + Details::InterfaceTraits<I8>::IidCount + Details::InterfaceTraits<I9>::IidCount;The total number of interface IDs.
Template parameters I0 and I1 are required, and parameters I2 through I9 are optional. The IID count of each interface is typically 1.
Verifies that each interface defined by template parameters I0 through I9 inherits from IUnknown and/or IInspectable, and that I0 inherits from I1 through I9.
WRL_NOTHROW __forceinline static void Verify();If the verification operation fails, a static_assert emits an error message describing the failure.
Template parameters I0 and I1 are required, and parameters I2 through I9 are optional.