description | title | ms.date | ms.topic | f1_keywords | helpviewer_keywords | ms.assetid | ||
---|---|---|---|---|---|---|---|---|
Learn more about: Platform::Guid value class |
Platform::Guid value class |
01/15/2019 |
reference |
|
|
25c0bfb2-7f93-44d8-bdf4-ef4fbac3424a |
Represents a [GUID](/windows/win32/api/guiddef/ns-guiddef-guid type in the Windows Runtime type system.
public value struct Guid
Platform::Guid
has the Equals()
, GetHashCode()
, and ToString()
methods derived from the Platform::Object Class, and the GetTypeCode()
method derived from the Platform::Type Class. Platform::Guid
also has the following members.
Member | Description |
---|---|
Guid | Initializes a new instance of a Platform::Guid . |
operator== | Equals operator. |
operator!= | Not equals operator. |
operator< | Less than operator. |
operator() | Converts a Platform::Guid to a GUID . |
To generate a new Platform::Guid
, use the Windows::Foundation::GuidHelper::CreateNewGuid static method.
Minimum supported client: Windows 8
Minimum supported server: Windows Server 2012
Namespace: Platform
Metadata: platform.winmd
Initializes a new instance of a Platform::Guid
.
Guid(
unsigned int a,
unsigned short b,
unsigned short c,
unsigned char d,
unsigned char e,
unsigned char f,
unsigned char g,
unsigned char h,
unsigned char i,
unsigned char j,
unsigned char k );
Guid(GUID m);
Guid(
unsigned int a,
unsigned short b,
unsigned short c,
Array<unsigned char>^ n );
a
The first 4 bytes of the GUID
.
b
The next 2 bytes of the GUID
.
c
The next 2 bytes of the GUID
.
d
The next byte of the GUID
.
e
The next byte of the GUID
.
f
The next byte of the GUID
.
g
The next byte of the GUID
.
h
The next byte of the GUID
.
i
The next byte of the GUID
.
j
The next byte of the GUID
.
k
The next byte of the GUID
.
m
A GUID
in the form a GUID structure.
n
The remaining 8 bytes of the GUID
.
Compares two Platform::Guid
instances for equality.
static bool Platform::Guid::operator==(Platform::Guid guid1, Platform::Guid guid2);
guid1
The first Platform::Guid
to compare.
guid2
The second Platform::Guid
to compare.
True if the two Platform::Guid
instances are equal.
Prefer using the ==
operator instead of the
Windows::Foundation::GuidHelper::Equals static method.
Compares two Platform::Guid
instances for inequality.
static bool Platform::Guid::operator!=(Platform::Guid guid1, Platform::Guid guid2);
guid1
The first Platform::Guid
to compare.
guid2
The second Platform::Guid
to compare.
True if the two Platform::Guid
instances are not equal.
Compares two Platform::Guid
instances for ordering.
static bool Platform::Guid::operator<(Platform::Guid guid1, Platform::Guid guid2);
guid1
The first Platform::Guid
to compare.
guid2
The second Platform::Guid
to compare.
True if guid1 is ordered before guid2. The ordering is lexicographic after treating each Platform::Guid
as if it's an array of four 32-bit unsigned values. This isn't the ordering used by SQL Server or the .NET Framework, nor is it the same as lexicographical ordering by string representation.
This operator is provided so that Guid
objects can be more easily consumed by the C++ standard library.
Implicitly converts a Platform::Guid
to a GUID structure.
const GUID& Platform::Guid::operator();