[vlc-devel] [PATCH] prepare for VisualC
Rafaël Carré
funman at videolan.org
Fri Nov 18 08:37:44 CET 2011
Le Fri, 18 Nov 2011 10:47:08 +0700,
Sergey Radionov <rsatom at gmail.com> a écrit :
> 2011/11/17 Jean-Baptiste Kempf <jb at videolan.org>
>
> > On Thu, Nov 17, 2011 at 09:32:37PM +0700, Sergey Radionov wrote :
> > > +#ifdef _MSC_VER
> > > +
> > > +const CATID CATID_SafeForScripting =
> > > + {0x7dd95801, 0x9882, 0x11cf,
> > {0x9f,0xa9,0x00,0xaa,0x00,0x6c,0x42,0xc4}};
> > > +const CATID CATID_SafeForInitializing =
> > > +
> > {0x7dd95802,0x9882,0x11cf,{0x9f,0xa9,0x00,0xaa,0x00,0x6c,0x42,0xc4}};
> > > +
> > > +#else /*!_MSC_VER*/
> > > +
> > > #include <_mingw.h>
> > >
> > > #ifdef __MINGW64_VERSION_MAJOR
> > > @@ -60,7 +69,7 @@ static DEFINE_GUID(CATID_SafeForScripting, \
> > > 0x7DD95801, 0x9882, 0x11CF, 0x9F, 0xA9,
> > 0x00,0xAA,0x00,0x6C,0x42,0xC4);
> > >
> > > #endif /* __MINGW64_VERSION_MAJOR */
> > > -
> > > +#endif /*_MSC_VER*/
> >
> > I don't see why you can't use the same codepath here.
> >
> >
> activex/main.cpp:
>
> *#ifdef __MINGW32__
> #include <_mingw.h>
> #endif
>
> #ifdef __MINGW64_VERSION_MAJOR
>
> #include <guiddef.h>
This one is actually unneeded
> #include <objsafe.h>
Where are those macros defined in Windows headers?
http://msdn.microsoft.com/en-us/library/aa751977(v=vs.85).aspx says
CATID_SafeForInitializing is in objsafe.h so I think it should be:
#include <objsafe.h>
#ifdef __MINGW32__
#include <_mingw.h>
#if defined(__MINGW32_MAJOR_VERSION) && !defined(__MINGW64_VERSION_MAJOR)
> /*
> ** Widl generated code requires guiddef.h,
> ** which is not available under MinGW32
> */
> #undef GUID_EXT
> #define GUID_EXT
> #include <initguid.h>
>
> /*
> ** Mingw32 do not declare those
> */
> /* CATID_InternetAware is declared as extern but not present in library */
> DEFINE_GUID(CATID_InternetAware, \
> 0x0DE86A58, 0x2BAA, 0x11CF, 0xA2, 0x29, 0x00,0xAA,0x00,0x3D,0x73,0x52);
> #endif /* __MINGW64_VERSION_MAJOR */
>
> #if defined(__MINGW32_MAJOR_VERSION) || defined (_MSC_VER)
> DEFINE_GUID(CATID_SafeForInitializing, \
> 0x7DD95802, 0x9882, 0x11CF, 0x9F, 0xA9, 0x00,0xAA,0x00,0x6C,0x42,0xC4);
> DEFINE_GUID(CATID_SafeForScripting, \
> 0x7DD95801, 0x9882, 0x11CF, 0x9F, 0xA9, 0x00,0xAA,0x00,0x6C,0x42,0xC4);
> #endif
> *
>
> Is it better?
--
Rafaël Carré
More information about the vlc-devel
mailing list