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

Sergey Radionov rsatom at gmail.com
Tue Jul 17 10:47:02 CEST 2012


2012/7/17 Rafaël Carré <funman at videolan.org>:
> 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?
maybe, don't know. this is standard code template in windows...

btw, I think I forgot about issue you fixed in
18896c020924f51f431641b030af8c6e488d3f4c
(http://git.videolan.org/?p=npapi-vlc.git;a=commit;h=18896c020924f51f431641b030af8c6e488d3f4c),
do I?

>
>> +#  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")));
>>
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> http://mailman.videolan.org/listinfo/vlc-devel



More information about the vlc-devel mailing list