[vlc-devel] [PATCH] Reduce number of defines and move some where they are used
Rafaël Carré
funman at videolan.org
Wed Jul 18 11:28:50 CEST 2012
Fix a problem with Visual Studio:
L"some wide string" "and not wide string"
!=
L"some wide string" L"and another wide string"
---
Does this fix the problem?
activex/main.cpp | 14 ++++----------
1 file changed, 4 insertions(+), 10 deletions(-)
diff --git a/activex/main.cpp b/activex/main.cpp
index 61f8415..96672bd 100644
--- a/activex/main.cpp
+++ b/activex/main.cpp
@@ -50,14 +50,7 @@ DEFINE_GUID(CATID_SafeForScripting, \
using namespace std;
-#define COMPANY_STR "VideoLAN"
-#define PROGRAM_STR "VLCPlugin"
-#define DESCRIPTION "VLC ActiveX Plugin and IE Web Plugin"
-
-#define THREADING_MODEL "Apartment"
-#define MISC_STATUS "131473"
-
-#define PROGID_STR COMPANY_STR"."PROGRAM_STR
+#define PROGID_STR "VideoLAN.VLCPlugin"
#define GUID_STRLEN 39
@@ -187,8 +180,7 @@ static HRESULT RegisterClassID(HKEY hParent, REFCLSID rclsid, unsigned int versi
TCHAR progId[sizeof(PROGID_STR)+16];
_stprintf(progId, TEXT("%s.%u"), PROGID_STR, version);
- TCHAR description[sizeof(DESCRIPTION)+16];
- _stprintf(description, TEXT("%s v%u"), DESCRIPTION, version);
+ _stprintf(description, TEXT("VLC ActiveX Plugin and IE Web Plugin v%u"), version);
HKEY hClassKey;
{
@@ -255,6 +247,7 @@ static HRESULT RegisterClassID(HKEY hParent, REFCLSID rclsid, unsigned int versi
#else
// InprocServer32 key value
{
+ #define THREADING_MODEL "Apartment"
HKEY hSubKey = keySetDef(keyCreate(hClassKey,
TEXT("InprocServer32")),
path, sizeof(TCHAR)*(pathLen+1));
@@ -266,6 +259,7 @@ static HRESULT RegisterClassID(HKEY hParent, REFCLSID rclsid, unsigned int versi
#endif
// MiscStatus key value
+ #define MISC_STATUS "131473"
keyClose(keySetDef(keyCreate(hClassKey,TEXT("MiscStatus\\1")),
TEXT(MISC_STATUS), sizeof(TEXT(MISC_STATUS))));
--
1.7.10.4
More information about the vlc-devel
mailing list