This commit is contained in:
Igor Pavlov
2023-12-22 17:17:05 +00:00
committed by Kornel
parent ec44a8a070
commit a36c48cece
954 changed files with 42199 additions and 25482 deletions

View File

@@ -1,8 +1,12 @@
// Common/MyGuidDef.h
// #pragma message "Common/MyGuidDef.h"
#ifndef GUID_DEFINED
#define GUID_DEFINED
// #pragma message "GUID_DEFINED"
#include "MyTypes.h"
typedef struct {
@@ -27,31 +31,33 @@ typedef GUID CLSID;
#ifdef __cplusplus
inline int operator==(REFGUID g1, REFGUID g2)
{
for (int i = 0; i < (int)sizeof(g1); i++)
if (((unsigned char *)&g1)[i] != ((unsigned char *)&g2)[i])
for (unsigned i = 0; i < sizeof(g1); i++)
if (((const unsigned char *)&g1)[i] != ((const unsigned char *)&g2)[i])
return 0;
return 1;
}
inline int operator!=(REFGUID g1, REFGUID g2) { return !(g1 == g2); }
#endif
#endif // GUID_DEFINED
#ifndef EXTERN_C
#ifdef __cplusplus
#define MY_EXTERN_C extern "C"
#define EXTERN_C extern "C"
#else
#define MY_EXTERN_C extern
#define EXTERN_C extern
#endif
#endif
#ifdef DEFINE_GUID
#undef DEFINE_GUID
#endif
#ifdef INITGUID
#define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
MY_EXTERN_C const GUID name = { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } }
EXTERN_C const GUID name; \
EXTERN_C const GUID name = { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } }
#else
#define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
MY_EXTERN_C const GUID name
EXTERN_C const GUID name
#endif