Bagikan melalui


winrt::guid struct (C++/WinRT)

Mewakili pengidentifikasi unik global (GUID).

Untuk detail selengkapnya, dan contoh kode, lihat Mengoperasikan dengan struct GUID ABI.

Sintaks

struct guid
{
    public:
        uint32_t Data1;
        uint16_t Data2;
        uint16_t Data3;
        uint8_t  Data4[8];

        guid() noexcept = default;

        constexpr guid(uint32_t const Data1, uint16_t const Data2, uint16_t const Data3, std::array<uint8_t, 8> const& Data4) noexcept;

#ifdef WINRT_IMPL_IUNKNOWN_DEFINED
        constexpr guid(GUID const& value) noexcept;
        operator GUID const&() const noexcept;
#endif

        constexpr explicit guid(std::string_view const value);
        constexpr explicit guid(std::wstring_view const value);
};

inline bool operator==(guid const& left, guid const& right) noexcept;
inline bool operator!=(guid const& left, guid const& right) noexcept;
inline bool operator<(guid const& left, guid const& right) noexcept;

Persyaratan

SDK minimum yang didukung: Windows SDK versi 10.0.17763.0 (Windows 10, versi 1809)

Namespace: winrt

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

Lihat juga