Skip to content

Commit 6511a15

Browse files
author
Colin Robertson
authored
Merge pull request MicrosoftDocs#1659 from MicrosoftDocs/FromPublicMasterBranch
Confirm merge from FromPublicMasterBranch to master to sync with https://github.com/MicrosoftDocs/cpp-docs (branch master)
2 parents ccc7cef + 8670a7d commit 6511a15

File tree

1 file changed

+71
-30
lines changed

1 file changed

+71
-30
lines changed

docs/cppcx/platform-guid-value-class.md

Lines changed: 71 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: "Platform::Guid value class"
3-
ms.date: "12/30/2016"
3+
ms.date: "01/15/2019"
44
ms.topic: "reference"
55
f1_keywords: ["VCCORLIB/Platform::Guid"]
66
helpviewer_keywords: ["Platform::Guid Struct"]
@@ -18,18 +18,19 @@ public value struct Guid
1818
1919
### Members
2020
21-
Guid has the Equals(), GetHashCode(), and ToString() methods derived from the [Platform::Object Class](../cppcx/platform-object-class.md), and the GetTypeCode() method derived from the [Platform::Type Class](../cppcx/platform-type-class.md). Guid also has the following members.
21+
`Platform::Guid` has the `Equals()`, `GetHashCode()`, and `ToString()` methods derived from the [Platform::Object Class](../cppcx/platform-object-class.md), and the `GetTypeCode()` method derived from the [Platform::Type Class](../cppcx/platform-type-class.md). `Platform::Guid` also has the following members.
2222
2323
|Member|Description|
2424
|------------|-----------------|
25-
|[Guid](#ctor)|Initializes a new instance of the Guid struct.|
25+
|[Guid](#ctor)|Initializes a new instance of a `Platform::Guid`.|
2626
|[operator==](#operator-equality)|Equals operator.|
27-
|[operator!=](#operator-not-equal)|Not equals operator.|
28-
|[operator()](#operator-call)|Converts a Guid to a GUID.|
27+
|[operator!=](#operator-inequality)|Not equals operator.|
28+
|[operator<](#operator-less)|Less than operator.|
29+
|[operator()](#operator-call)|Converts a `Platform::Guid` to a `GUID`.|
2930
3031
### Remarks
3132
32-
For an example of how to generate a new Platform::Guid using the Windows function [CoCreateGuid](/windows/desktop/api/combaseapi/nf-combaseapi-cocreateguid), see [WinRT component: How to generate a GUID?](http://blogs.msdn.com/b/eternalcoding/archive/2013/03/25/winrt-component-how-to-generate-a-guid.aspx)
33+
For an example of how to generate a new `Platform::Guid` using the Windows function [CoCreateGuid](/windows/desktop/api/combaseapi/nf-combaseapi-cocreateguid), see [WinRT component: How to generate a GUID?](https://www.eternalcoding.com/?p=383)
3334
3435
### Requirements
3536
@@ -43,7 +44,7 @@ For an example of how to generate a new Platform::Guid using the Windows functio
4344
4445
## <a name="ctor"></a> Guid::Guid Constructors
4546
46-
Initializes a new instance of a Guid struct.
47+
Initializes a new instance of a `Platform::Guid`.
4748
4849
### Syntax
4950
@@ -73,86 +74,126 @@ Guid(
7374
### Parameters
7475

7576
*a*<br/>
76-
The first 4 bytes of the GUID.
77+
The first 4 bytes of the `GUID`.
7778

7879
*b*<br/>
79-
The next 2 bytes of the GUID.
80+
The next 2 bytes of the `GUID`.
8081

8182
*c*<br/>
82-
The next 2 bytes of the GUID.
83+
The next 2 bytes of the `GUID`.
8384

8485
*d*<br/>
85-
The next byte of the GUID.
86+
The next byte of the `GUID`.
8687

8788
*e*<br/>
88-
The next byte of the GUID.
89+
The next byte of the `GUID`.
8990

9091
*f*<br/>
91-
The next byte of the GUID.
92+
The next byte of the `GUID`.
9293

9394
*g*<br/>
94-
The next byte of the GUID.
95+
The next byte of the `GUID`.
9596

9697
*h*<br/>
97-
The next byte of the GUID.
98+
The next byte of the `GUID`.
9899

99100
*i*<br/>
100-
The next byte of the GUID.
101+
The next byte of the `GUID`.
101102

102103
*j*<br/>
103-
The next byte of the GUID.
104+
The next byte of the `GUID`.
104105

105106
*k*<br/>
106-
The next byte of the GUID.
107+
The next byte of the `GUID`.
107108

108109
*m*<br/>
109-
A GUID as defined.
110+
A `GUID` in the form a [GUID structure](https://msdn.microsoft.com/library/windows/desktop/aa373931).
110111

111112
*n*<br/>
112-
The remaining 8 bytes of the GUID.
113+
The remaining 8 bytes of the `GUID`.
113114

114115
## <a name="operator-equality"></a> Guid::operator== Operator
115116

116-
Compares two guids.
117+
Compares two `Platform::Guid` instances for equality.
117118

118119
### Syntax
119120

120121
```cpp
121-
Platform::Guid::operator==
122+
static bool Platform::Guid::operator==(Platform::Guid guid1, Platform::Guid guid2);
122123
```
123124

125+
### Parameters
126+
127+
*guid1*<br/>
128+
The first `Platform::Guid` to compare.
129+
130+
*guid2*<br/>
131+
The second `Platform::Guid` to compare.
132+
124133
### Return Value
125134

126-
True if the two guids are equal.
135+
True if the two `Platform::Guid` instances are equal.
127136

128137
## <a name="operator-inequality"></a> Guid::operator!= Operator
129138

130-
Compares two guids.
139+
Compares two `Platform::Guid` instances for inequality.
131140

132141
### Syntax
133142

134143
```cpp
135-
Platform::Guid::operator!=
144+
static bool Platform::Guid::operator!=(Platform::Guid guid1, Platform::Guid guid2);
136145
```
137146

147+
### Parameters
148+
149+
*guid1*<br/>
150+
The first `Platform::Guid` to compare.
151+
152+
*guid2*<br/>
153+
The second `Platform::Guid` to compare.
154+
138155
### Return Value
139156

140-
True if the two guids are not equal.
157+
True if the two `Platform::Guid` instances are not equal.
158+
159+
## <a name="operator-less"></a> Guid::operator&lt; Operator
160+
161+
Compares two `Platform::Guid` instances for ordering.
162+
163+
### Syntax
164+
165+
```cpp
166+
static bool Platform::Guid::operator<(Platform::Guid guid1, Platform::Guid guid2);
167+
```
168+
169+
### Parameters
170+
171+
*guid1*<br/>
172+
The first `Platform::Guid` to compare.
173+
174+
*guid2*<br/>
175+
The second `Platform::Guid` to compare.
176+
177+
### Return Value
178+
179+
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.
180+
181+
This operator is provided so that `Guid` objects can be more easily consumed by the C++ standard library.
141182

142183
## <a name="operator-call"></a> Guid::operator() Operator
143184

144-
Implicitly converts a [GUID structure](https://msdn.microsoft.com/library/windows/desktop/aa373931)GUID to a Platform::Guid.
185+
Implicitly converts a `Platform::Guid` to a [GUID structure](https://msdn.microsoft.com/library/windows/desktop/aa373931).
145186

146187
### Syntax
147188

148189
```cpp
149-
Platform::Guid operator();
190+
const GUID& Platform::Guid::operator();
150191
```
151192

152193
### Return Value
153194

154-
A Guid struct.
195+
A [GUID structure](https://msdn.microsoft.com/library/windows/desktop/aa373931).
155196

156197
## See Also
157198

158-
[Platform namespace](../cppcx/platform-namespace-c-cx.md)
199+
[Platform namespace](../cppcx/platform-namespace-c-cx.md)

0 commit comments

Comments
 (0)