InterfaceTraits::CastToUnknown Method
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::CastToUnknown Method.
Supports the WRL infrastructure and is not intended to be used directly from your code.
Syntax
template<
typename T
>
static __forceinline IUnknown* CastToUnknown(
_In_ T* ptr
);
Parameters
T
The type of parameter ptr
.
ptr
Pointer to type T
.
Return Value
Pointer to the IUnknown from which Base
is derived.
Remarks
Casts the specified pointer to a pointer to IUnknown.
For more information about Base
, see the Public Typedefs section in InterfaceTraits Structure.
Requirements
Header: implements.h
Namespace: Microsoft::WRL::Details