InterfaceTraits Structure

 

The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.

The latest version of this topic can be found at InterfaceTraits Structure.

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

template<  
   typename I0  
>  
struct __declspec(novtable) InterfaceTraits;  
template<  
   typename CloakedType  
>  
struct __declspec(novtable) InterfaceTraits<CloakedIid<CloakedType>>;  
  
template<>  
struct __declspec(novtable) InterfaceTraits<Nil>;  

Parameters

I0
The name of an interface.

CloakedType
For RuntimeClass, Implements and ChainInterfaces, an interface that won't be in the list of supported interface IDs.

Implements common characteristics of an interface.

The second template is a specialization for cloaked interfaces. The third template is a specialization for Nil parameters.

Public Typedefs

NameDescription
BaseA synonym for the I0 template parameter.

Public Methods

NameDescription
InterfaceTraits::CanCastTo MethodIndicates whether the specified pointer can be cast to a pointer to Base.
InterfaceTraits::CastToBase MethodCasts the specified pointer to a pointer to Base.
InterfaceTraits::CastToUnknown MethodCasts the specified pointer to a pointer to IUnknown.
InterfaceTraits::FillArrayWithIid MethodAssigns the interface ID of Base to the array element specified by the index argument.
InterfaceTraits::Verify MethodVerifies that Base is properly derived.

Public Constants

NameDescription
InterfaceTraits::IidCount ConstantHolds the number of interface IDs associated with the current InterfaceTraits object.

InterfaceTraits

Header: implements.h

Namespace: Microsoft::WRL::Details

Microsoft::WRL::Details Namespace

Show: