Sdílet prostřednictvím


winrt::guid_of šablona funkce (C++/WinRT)

Šablona pomocné funkce, která načte identifikátor GUID třídy modulu runtime, třídy coclass nebo rozhraní; to znamená identifikátor typu WinRT. Pro rozhraní COM a WinRT je to identifikátor rozhraní. Pro třídy WinRT je identifikátor výchozího rozhraní třídy.

Je to jenom tehdy, když a kdy guid_v (viz implementace funkce) není specializované, že se funkce vrátí zpět na použití __uuidof, pokud je to možné.

Syntax

template <typename T>
constexpr winrt::guid const& guid_of() noexcept;

Template parameters

typename T Typ třídy modulu runtime, třídy coclass nebo rozhraní, jehož identifikátor GUID chcete načíst.

Return value

A winrt::guid value containing the globally unique identifier of T.

Requirements

Minimální podporovaná sada SDK: Windows SDK verze 10.0.17134.0 (Windows 10, verze 1803)

Namespace: winrt

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

See also