[vlc-devel] [PATCH] fixed compilation under Visual Studio
Sergey Radionov
rsatom at gmail.com
Tue Jul 17 06:29:39 CEST 2012
---
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
+# 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")));
--
1.7.7.1.msysgit.0
More information about the vlc-devel
mailing list