Share via


InterfaceTraits::CastToUnknown Method

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

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

See Also

Reference

InterfaceTraits Structure

Microsoft::WRL::Details Namespace