Share via


InterfaceTraits::CastToBase Method

 

The latest version of this topic can be found at InterfaceTraits::CastToBase Method.

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

Syntax

template<  
   typename T  
>  
static __forceinline Base* CastToBase(  
   _In_ T* ptr  
);  

Parameters

T
The type of parameter ptr.

ptr
Pointer to a type T.

Return Value

A pointer to Base.

Remarks

Casts the specified pointer to a pointer to Base.

For more information about Base, see the Public Typedefs section in InterfaceTraits Structure.

Requirements

Header: implements.h

Namespace: Microsoft::WRL::Details

See Also

InterfaceTraits Structure
Microsoft::WRL::Details Namespace