aboutsummaryrefslogtreecommitdiff
path: root/CPP/Common/MyInitGuid.h
diff options
context:
space:
mode:
authorDavid Srbecky <dsrbecky@google.com>2015-05-11 12:31:23 +0100
committerDavid Srbecky <dsrbecky@google.com>2015-05-13 01:06:58 +0100
commitcd66d540cead3f8200b0c73bad9c276d67896c3d (patch)
treed25a4a409bd041f18b856e156cf1fa71f6169369 /CPP/Common/MyInitGuid.h
parentb473eaa2840cccf2fef15d53f00bccf92c41b615 (diff)
downloadlzma-cd66d540cead3f8200b0c73bad9c276d67896c3d.tar.gz
Updated LZMA SDK to 9.38 beta.
The webpage says "If you use XZ code from LZMA SDK, it's recommended to upgrade to new XZ code from 7-Zip 9.38 beta. That new code fixes some bugs." and we do use the XZ code. The code is identical to the stock LZMA SDK with the following changes: deleted bin/ added C/Util/Lzma/Android.mk added MODULE_LICENSE_PUBLIC_DOMAIN added NOTICE added xz-embedded/ Change-Id: Ibc5d353748420f7b3ae2877d625d7ddb788bdc6e
Diffstat (limited to 'CPP/Common/MyInitGuid.h')
-rw-r--r--[-rwxr-xr-x]CPP/Common/MyInitGuid.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/CPP/Common/MyInitGuid.h b/CPP/Common/MyInitGuid.h
index 98d1705..79fea19 100755..100644
--- a/CPP/Common/MyInitGuid.h
+++ b/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