[vlc-devel] [PATCH] fixed compilation under Visual Studio

Rafaël Carré funman at videolan.org
Tue Jul 17 10:26:21 CEST 2012


Hello Sergey,

Le 2012-07-17 06:29, Sergey Radionov a écrit :
> ---
>  activex/main.cpp |   15 +++++++++++----
>  1 files changed, 11 insertions(+), 4 deletions(-)
> 
> diff --git a/activex/main.cpp b/activex/main.cpp
> index 61f8415..74bf4aa 100644
> --- a/activex/main.cpp
> +++ b/activex/main.cpp
> @@ -57,7 +57,14 @@ using namespace std;
>  #define THREADING_MODEL "Apartment"
>  #define MISC_STATUS     "131473"
>  
> -#define PROGID_STR COMPANY_STR"."PROGRAM_STR
> +#define PROGID_STR_A COMPANY_STR"."PROGRAM_STR
> +#define PROGID_STR_W TEXT(COMPANY_STR)TEXT(".")TEXT(PROGRAM_STR)
> +
> +#ifdef UNICODE

Isn't UNICODE always defined?

> +#  define PROGID_STR PROGID_STR_W
> +#else
> +#  define PROGID_STR PROGID_STR_A
> +#endif
>  
>  #define GUID_STRLEN 39
>  
> @@ -174,7 +181,7 @@ STDAPI DllUnregisterServer(VOID)
>          pcr->Release();
>      }
>  
> -    SHDeleteKey(HKEY_CLASSES_ROOT, TEXT(PROGID_STR));
> +    SHDeleteKey(HKEY_CLASSES_ROOT, PROGID_STR);
>  
>      UnregisterProgID(CLSID_VLCPlugin, 2);
>      UnregisterProgID(CLSID_VLCPlugin2, 1);
> @@ -211,7 +218,7 @@ static HRESULT RegisterClassID(HKEY hParent, REFCLSID rclsid, unsigned int versi
>          }
>          if( isDefault )
>          {
> -            hProgKey = keyCreate(HKEY_CLASSES_ROOT, TEXT(PROGID_STR));
> +            hProgKey = keyCreate(HKEY_CLASSES_ROOT, PROGID_STR);
>              if( NULL != hProgKey )
>              {
>                  // default key value
> @@ -278,7 +285,7 @@ static HRESULT RegisterClassID(HKEY hParent, REFCLSID rclsid, unsigned int versi
>          // VersionIndependentProgID key value
>          keyClose(keySetDef(keyCreate(hClassKey,
>                                       TEXT("VersionIndependentProgID")),
> -                           TEXT(PROGID_STR), sizeof(TEXT(PROGID_STR))));
> +                           PROGID_STR, sizeof(PROGID_STR)));
>  
>          // Version key value
>          keyClose(keySetDef(keyCreate(hClassKey,TEXT("Version")),TEXT("1.0")));
> 




More information about the vlc-devel mailing list