[vlc-commits] mingw-w64 includes objsafe.h macros

Rafaël Carré git at videolan.org
Mon Nov 7 16:31:14 CET 2011


activex-vlc | branch: master | Rafaël Carré <funman at videolan.org> | Mon Nov  7 10:25:13 2011 -0500| [0fd108528c78f3c61c2468498e3b414e2ee7fa25] | committer: Rafaël Carré

mingw-w64 includes objsafe.h macros

> http://git.videolan.org/gitweb.cgi/activex-vlc.git/?a=commit;h=0fd108528c78f3c61c2468498e3b414e2ee7fa25
---

 src/main.cpp |   38 ++++++++++++++++++++++----------------
 1 files changed, 22 insertions(+), 16 deletions(-)

diff --git a/src/main.cpp b/src/main.cpp
index 1772db3..c9c3882 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -32,9 +32,14 @@
 #include <tchar.h>
 
 #include <_mingw.h>
+
 #ifdef __MINGW64_VERSION_MAJOR
+
 #include <guiddef.h>
+#include <objsafe.h>
+
 #else /* ! __MINGW64_VERSION_MAJOR */
+
 /*
 ** Widl generated code requires guiddef.h,
 ** which is not available under MinGW32
@@ -42,6 +47,17 @@
 #undef GUID_EXT
 #define GUID_EXT
 #include <initguid.h>
+
+/*
+** MingW headers & libs do not declare those
+*/
+static DEFINE_GUID(CATID_InternetAware, \
+	0x0DE86A58, 0x2BAA, 0x11CF, 0xA2, 0x29, 0x00,0xAA,0x00,0x3D,0x73,0x52);
+static DEFINE_GUID(CATID_SafeForInitializing, \
+	0x7DD95802, 0x9882, 0x11CF, 0x9F, 0xA9, 0x00,0xAA,0x00,0x6C,0x42,0xC4);
+static DEFINE_GUID(CATID_SafeForScripting, \
+	0x7DD95801, 0x9882, 0x11CF, 0x9F, 0xA9, 0x00,0xAA,0x00,0x6C,0x42,0xC4);
+
 #endif /* __MINGW64_VERSION_MAJOR */
 
 
@@ -58,16 +74,6 @@ using namespace std;
 
 #define GUID_STRLEN 39
 
-/*
-** MingW headers & libs do not declare those
-*/
-static DEFINE_GUID(_CATID_InternetAware, \
-	0x0DE86A58, 0x2BAA, 0x11CF, 0xA2, 0x29, 0x00,0xAA,0x00,0x3D,0x73,0x52);
-static DEFINE_GUID(_CATID_SafeForInitializing, \
-	0x7DD95802, 0x9882, 0x11CF, 0x9F, 0xA9, 0x00,0xAA,0x00,0x6C,0x42,0xC4);
-static DEFINE_GUID(_CATID_SafeForScripting, \
-	0x7DD95801, 0x9882, 0x11CF, 0x9F, 0xA9, 0x00,0xAA,0x00,0x6C,0x42,0xC4);
-
 static LONG i_class_ref= 0;
 static HINSTANCE h_instance= 0;
 
@@ -169,9 +175,9 @@ STDAPI DllUnregisterServer(VOID)
         CATID implCategories[] = {
             CATID_Control,
             CATID_PersistsToPropertyBag,
-            _CATID_InternetAware,
-            _CATID_SafeForInitializing,
-            _CATID_SafeForScripting,
+            CATID_InternetAware,
+            CATID_SafeForInitializing,
+            CATID_SafeForScripting,
         };
 
         pcr->UnRegisterClassImplCategories(CLSID_VLCPlugin,
@@ -330,9 +336,9 @@ STDAPI DllRegisterServer(VOID)
         CATID implCategories[] = {
             CATID_Control,
             CATID_PersistsToPropertyBag,
-            _CATID_InternetAware,
-            _CATID_SafeForInitializing,
-            _CATID_SafeForScripting,
+            CATID_InternetAware,
+            CATID_SafeForInitializing,
+            CATID_SafeForScripting,
         };
 
         pcr->RegisterClassImplCategories(CLSID_VLCPlugin,



More information about the vlc-commits mailing list