I am looking for the easiest way to compare two GUIDs for equality in C++. Surely there is a predefined function for that.
The solution needs to work with Visual C++ 2010.
I am talking of GUID as defined in Guiddef.h:
typedef struct _GUID {
unsigned long Data1;
unsigned short Data2;
unsigned short Data3;
unsigned char Data4[ 8 ];
} GUID;
Perhaps you want IsEqualGUID (which uses memcmp behind the scenes) or just use operator==
(which calls IsEqualGUID for you).
Is the == operator not overloaded to do this for you? Or use IsEqualGUID.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With