mirror of
https://github.com/Xevion/easy7zip.git
synced 2025-12-11 18:07:08 -06:00
23.01
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user