summaryrefslogtreecommitdiffstats
path: root/src/libs/7zip/unix/CPP/Common/MyInitGuid.h
diff options
context:
space:
mode:
authorKarsten Heimrich <karsten.heimrich@theqtcompany.com>2015-06-09 16:04:24 +0200
committerKarsten Heimrich <karsten.heimrich@theqtcompany.com>2015-06-10 08:15:38 +0000
commit4677d362982a38c6e2aabb667e33aaa7f921f018 (patch)
treefe3b676288f05a87cdbb53a170e815427e3d9380 /src/libs/7zip/unix/CPP/Common/MyInitGuid.h
parent22ec6aa53e44069c03c7baf94881949c7a4facff (diff)
Update source tree with version 9.38.beta of LZMA SDK.
- Remove unused files. - Split in .pri files. - Add HEADERS section. - Adjust lib7z_facade. Change-Id: I31e7bafbfe1a9346364bd58c391601955f98ad3a Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
Diffstat (limited to 'src/libs/7zip/unix/CPP/Common/MyInitGuid.h')
-rw-r--r--src/libs/7zip/unix/CPP/Common/MyInitGuid.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/libs/7zip/unix/CPP/Common/MyInitGuid.h b/src/libs/7zip/unix/CPP/Common/MyInitGuid.h
index d6a486980..279fba5d6 100644
--- a/src/libs/7zip/unix/CPP/Common/MyInitGuid.h
+++ b/src/libs/7zip/unix/CPP/Common/MyInitGuid.h
@@ -3,20 +3,43 @@
#ifndef __COMMON_MY_INITGUID_H
#define __COMMON_MY_INITGUID_H
+/*
+This file must be included only to one C++ file in project before
+declarations of COM interfaces with DEFINE_GUID macro.
+
+Each GUID must be initialized exactly once in project.
+There are two different versions of the DEFINE_GUID macro in guiddef.h (MyGuidDef.h):
+ - if INITGUID is not defined: DEFINE_GUID declares an external reference to the symbol name.
+ - if INITGUID is defined: DEFINE_GUID initializes the symbol name to the value of the GUID.
+
+Also we need IID_IUnknown that is initialized in some file for linking:
+ MSVC: by default the linker uses some lib file that contains IID_IUnknown
+ MinGW: add -luuid switch for linker
+ WinCE: we define IID_IUnknown in this file
+ Other: we define IID_IUnknown in this file
+*/
+
#ifdef _WIN32
+
#ifdef UNDER_CE
#include <basetyps.h>
#endif
+
#include <initguid.h>
+
#ifdef UNDER_CE
DEFINE_GUID(IID_IUnknown,
0x00000000, 0x0000, 0x0000, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46);
#endif
+
#else
+
#define INITGUID
#include "MyGuidDef.h"
DEFINE_GUID(IID_IUnknown,
0x00000000, 0x0000, 0x0000, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46);
+
#endif
+
#endif