Skip to content

Latest commit

 

History

History
45 lines (34 loc) · 1.51 KB

File metadata and controls

45 lines (34 loc) · 1.51 KB
description title dev_langs ms.date ms.topic keywords ms.workload
A helper function which, given an object of a projected type, retrieves a pointer to the implementation.
winrt::get_self function template (C++/WinRT)
C++
08/29/2018
language-reference
windows 10, uwp, standard, c++, cpp, winrt, projection, api, reference, projected, implementation, type
cplusplus

winrt::get_self function template (C++/WinRT)

A helper function which, given an object of a projected type, retrieves a pointer to the implementation. For more details, and code examples, see Instantiating and returning implementation types and interfaces.

Syntax

template <typename D, typename I>
D* get_self(I const& from) noexcept

Template parameters

typename D An implementation type.

typename I A projected interface or runtime class type.

Parameters

from An object of a projected type, a pointer to whose implementation to retrieve. This parameter may not be null.

Return value

A pointer to the implementation object that implements the interface object.

Requirements

Minimum supported SDK: Windows SDK version 10.0.17763.0 (Windows 10, version 1809)

Namespace: winrt

Header: %WindowsSdkDir%Include<WindowsTargetPlatformVersion>\cppwinrt\winrt\base.h (included by default)

See also