[vlc-devel] [PATCH] ActiveX: Changed files to be compilable by VC.

Jean-Baptiste Kempf jb at videolan.org
Fri Nov 18 12:15:34 CET 2011


On Fri, Nov 18, 2011 at 05:56:21PM +0700, Sergey Radionov wrote :
> +#ifndef _MSC_VER
>  ////////////////////////////////////////////////////////////////////////////////////////////////
>  DEFINE_GUID(IID_IGlobalInterfaceTable,     0x00000146, 0x0000, 0x0000, 0xc0,0x00, 0x00,0x00,0x00,0x00,0x00,0x46);
>  DEFINE_GUID(CLSID_StdGlobalInterfaceTable, 0x00000323, 0x0000, 0x0000, 0xc0,0x00, 0x00,0x00,0x00,0x00,0x00,0x46);
> @@ -40,6 +41,7 @@ DEFINE_GUID(CLSID_StdGlobalInterfaceTable, 0x00000323, 0x0000, 0x0000, 0xc0,0x00
>  const GUID  IID_IGlobalInterfaceTable = { 0x00000146, 0, 0, {0xc0, 0, 0, 0, 0, 0, 0, 0x46} };
>  const CLSID CLSID_StdGlobalInterfaceTable = { 0x00000323, 0, 0, {0xc0, 0, 0, 0, 0, 0, 0, 0x46} };
>  ////////////////////////////////////////////////////////////////////////////////////////////////
> +#endif

Why not #ifdef _MINGW? It seems the issue is a lack of those GUID in the
mingw header, not a fault of MSC

> +#ifdef __MINGW32__
>  #include <_mingw.h>
> +#endif
Ok.

> -#ifdef __MINGW64_VERSION_MAJOR
> -
> -#include <guiddef.h>
>  #include <objsafe.h>
>  
> -#else /* ! __MINGW64_VERSION_MAJOR */
> -
> +#if defined(__MINGW32_MAJOR_VERSION) && !defined(__MINGW64_VERSION_MAJOR)
>  /*
>  ** Widl generated code requires guiddef.h,
>  ** which is not available under MinGW32
> @@ -54,13 +52,11 @@
>  /* 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);
> -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 */
> -
> +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
OK.

> +#ifdef _MSC_VER
> +#define PROGID_STR "VideoLAN.VLCPlugin"
> +#else
>  #define PROGID_STR COMPANY_STR"."PROGRAM_STR
> +#endif

Still not at ease with this, but well...

>          // ToolboxBitmap32 key value
>          {
> -            TCHAR iconPath[pathLen+3];
> +            std::vector<TCHAR> iconPathBuf(pathLen+3, 0);
> +            TCHAR* iconPath = &iconPathBuf[0];
Ok.

> +#ifdef _MSC_VER
> +#include "../vc_config.h"
> +#endif //_MSC_VER
> +
>  using namespace std;
>  
>  ////////////////////////////////////////////////////////////////////////
> diff --git a/activex/position.h b/activex/position.h
> index ec1c7f8..8d179df 100644
> --- a/activex/position.h
> +++ b/activex/position.h
> @@ -22,6 +22,10 @@
>  #ifndef POSITION_H
>  #define POSITION_H
>  
> +#ifdef _MSC_VER
> +#include "../vc_config.h"
> +#endif //_MSC_VER

I am not such a fan of this... Can we do something clever in autotools?

Best Regards,

-- 
Jean-Baptiste Kempf
http://www.jbkempf.com/ - +33 672 704 734
Sent from my Electronic Device



More information about the vlc-devel mailing list