Skip to content

Latest commit

 

History

History
163 lines (117 loc) · 3.68 KB

platform-guid-value-class.md

File metadata and controls

163 lines (117 loc) · 3.68 KB
title ms.custom ms.date ms.technology ms.reviewer ms.suite ms.tgt_pltfrm ms.topic f1_keywords dev_langs helpviewer_keywords ms.assetid caps.latest.revision author ms.author manager
Platform::Guid value class | Microsoft Docs
12/30/2016
cpp-windows
language-reference
VCCORLIB/Platform::Guid
C++
Platform::Guid Struct
25c0bfb2-7f93-44d8-bdf4-ef4fbac3424a
6
ghogen
ghogen
ghogen

Platform::Guid value class

Represents a GUID type in the Windows Runtime type system.

Syntax

public value struct Guid  

Members

Guid has the Equals(), GetHashCode(), and ToString() methods derived from the Platform::Object Class, and the GetTypeCode() method derived from the Platform::Type Class. Guid also has the following members.

Member Description
Guid Initializes a new instance of the Guid struct.
operator== Equals operator.
operator!= Not equals operator.
operator() Converts a Guid to a GUID.

Remarks

For an example of how to generate a new Platform::Guid using the Windows function CoCreateGuid, see WinRT component: How to generate a GUID?

Requirements

Minimum supported client: Windows 8

Minimum supported server: Windows Server 2012

Namespace: Platform

Metadata: platform.winmd

Guid::Guid Constructors

Initializes a new instance of a Guid struct.

Syntax

  
    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 );  

Parameters

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 as defined .

n
The remaining 8 bytes of the GUID.

Guid::operator== Operator

Compares two guids.

Syntax

Platform::Guid::operator==  

Return Value

True if the two guids are equal.

Guid::operator!= Operator

Compares two guids.

Syntax

Platform::Guid::operator!=  

Return Value

True if the two guids are not equal.

Guid::operator() Operator

Implicitly converts a GUID structureGUID to a Platform::Guid.

Syntax

Platform::Guid operator()  

Return Value

A Guid struct.

See Also

Platform namespace