Signed-off-by: Alistair Leslie-Hughes leslie_alistair@hotmail.com --- include/guiddef.h | 12 ++++++++++++ 1 file changed, 12 insertions(+)
diff --git a/include/guiddef.h b/include/guiddef.h index 2adde9ca23..74fdd3b9f9 100644 --- a/include/guiddef.h +++ b/include/guiddef.h @@ -139,8 +139,20 @@ typedef GUID FMTID,*LPFMTID;
#if defined(__cplusplus) && !defined(CINTERFACE) #define IsEqualGUID(rguid1, rguid2) (!memcmp(&(rguid1), &(rguid2), sizeof(GUID))) +inline int InlineIsEqualGUID(REFGUID rguid1, REFGUID rguid2) +{ + return (((unsigned long *)&rguid1)[0] == ((unsigned long *)&rguid2)[0] && + ((unsigned long *)&rguid1)[1] == ((unsigned long *)&rguid2)[1] && + ((unsigned long *)&rguid1)[2] == ((unsigned long *)&rguid2)[2] && + ((unsigned long *)&rguid1)[3] == ((unsigned long *)&rguid2)[3]); +} #else /* defined(__cplusplus) && !defined(CINTERFACE) */ #define IsEqualGUID(rguid1, rguid2) (!memcmp(rguid1, rguid2, sizeof(GUID))) +#define InlineIsEqualGUID(rguid1, rguid2) \ + (((unsigned long *)rguid1)[0] == ((unsigned long *)rguid2)[0] && \ + ((unsigned long *)rguid1)[1] == ((unsigned long *)rguid2)[1] && \ + ((unsigned long *)rguid1)[2] == ((unsigned long *)rguid2)[2] && \ + ((unsigned long *)rguid1)[3] == ((unsigned long *)rguid2)[3]) #endif /* defined(__cplusplus) && !defined(CINTERFACE) */
#if defined(__cplusplus) && !defined(CINTERFACE)
Alistair Leslie-Hughes leslie_alistair@hotmail.com wrote:
+inline int InlineIsEqualGUID(REFGUID rguid1, REFGUID rguid2) +{
- return (((unsigned long *)&rguid1)[0] == ((unsigned long *)&rguid2)[0] &&
((unsigned long *)&rguid1)[1] == ((unsigned long *)&rguid2)[1] &&
((unsigned long *)&rguid1)[2] == ((unsigned long *)&rguid2)[2] &&
((unsigned long *)&rguid1)[3] == ((unsigned long *)&rguid2)[3]);
+}
Will this work on 64-bit?