[vlc-commits] activex: fix char/wchar_t confusion

Rafaël Carré git at videolan.org
Wed Jul 4 13:27:57 CEST 2012


npapi-vlc | branch: master | Rafaël Carré <funman at videolan.org> | Wed Jul  4 13:27:11 2012 +0200| [18896c020924f51f431641b030af8c6e488d3f4c] | committer: Rafaël Carré

activex: fix char/wchar_t confusion

%s needs char *

> http://git.videolan.org/gitweb.cgi/npapi-vlc.git/?a=commit;h=18896c020924f51f431641b030af8c6e488d3f4c
---

 activex/main.cpp |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/activex/main.cpp b/activex/main.cpp
index 9457c07..61f8415 100644
--- a/activex/main.cpp
+++ b/activex/main.cpp
@@ -57,7 +57,7 @@ using namespace std;
 #define THREADING_MODEL "Apartment"
 #define MISC_STATUS     "131473"
 
-#define PROGID_STR TEXT(COMPANY_STR) TEXT(".") TEXT(PROGRAM_STR)
+#define PROGID_STR COMPANY_STR"."PROGRAM_STR
 
 #define GUID_STRLEN 39
 
@@ -174,7 +174,7 @@ STDAPI DllUnregisterServer(VOID)
         pcr->Release();
     }
 
-    SHDeleteKey(HKEY_CLASSES_ROOT, PROGID_STR);
+    SHDeleteKey(HKEY_CLASSES_ROOT, TEXT(PROGID_STR));
 
     UnregisterProgID(CLSID_VLCPlugin, 2);
     UnregisterProgID(CLSID_VLCPlugin2, 1);
@@ -188,7 +188,7 @@ static HRESULT RegisterClassID(HKEY hParent, REFCLSID rclsid, unsigned int versi
     _stprintf(progId, TEXT("%s.%u"), PROGID_STR, version);
 
     TCHAR description[sizeof(DESCRIPTION)+16];
-    _stprintf(description, TEXT("%s v%u"), TEXT(DESCRIPTION), version);
+    _stprintf(description, TEXT("%s v%u"), DESCRIPTION, version);
 
     HKEY hClassKey;
     {
@@ -211,7 +211,7 @@ static HRESULT RegisterClassID(HKEY hParent, REFCLSID rclsid, unsigned int versi
         }
         if( isDefault )
         {
-            hProgKey = keyCreate(HKEY_CLASSES_ROOT, PROGID_STR);
+            hProgKey = keyCreate(HKEY_CLASSES_ROOT, TEXT(PROGID_STR));
             if( NULL != hProgKey )
             {
                 // default key value
@@ -278,7 +278,7 @@ static HRESULT RegisterClassID(HKEY hParent, REFCLSID rclsid, unsigned int versi
         // VersionIndependentProgID key value
         keyClose(keySetDef(keyCreate(hClassKey,
                                      TEXT("VersionIndependentProgID")),
-                           PROGID_STR, sizeof(PROGID_STR)));
+                           TEXT(PROGID_STR), sizeof(TEXT(PROGID_STR))));
 
         // Version key value
         keyClose(keySetDef(keyCreate(hClassKey,TEXT("Version")),TEXT("1.0")));



More information about the vlc-commits mailing list