summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-08-25 15:59:04 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-08-25 15:59:04 +0000
commitd92b3ee6346bdb74fa19353336dbdbaa954b6ec8 (patch)
tree654e46971a23cbb6768a1623855006186a236c1d
parentcefec54dec3fb9cda93dd0a2c85e56891afe13e2 (diff)
minor cleaning
git-svn-id: http://svn.miranda-ng.org/main/trunk@5831 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r--plugins/ShellExt/src/main.cpp18
-rw-r--r--plugins/ShellExt/src/shlcom.cpp4
2 files changed, 12 insertions, 10 deletions
diff --git a/plugins/ShellExt/src/main.cpp b/plugins/ShellExt/src/main.cpp
index 9e5d6df1a6..1de8cef3e8 100644
--- a/plugins/ShellExt/src/main.cpp
+++ b/plugins/ShellExt/src/main.cpp
@@ -65,27 +65,33 @@ STDAPI DllRegisterServer()
if ( RegSetValueA(k1, "CLSID", REG_SZ, str2, sizeof(str2)))
return E_FAIL;
- HRegKey k11(HKEY_CLASSES_ROOT, "CLSID\\{72013A26-A94C-11d6-8540-A5E62932711D}");
- if (k11 == NULL)
+ //////////////////////////////////////////////////////////////////////////////////////
+
+ HRegKey kClsid(HKEY_CLASSES_ROOT, "CLSID\\{72013A26-A94C-11d6-8540-A5E62932711D}");
+ if (kClsid == NULL)
return E_FAIL;
- if ( RegSetValueA(k11, NULL, REG_SZ, str3, sizeof(str3)))
+ if ( RegSetValueA(kClsid, NULL, REG_SZ, str3, sizeof(str3)))
return E_FAIL;
- if ( RegSetValueA(k11, "ProgID", REG_SZ, str3, sizeof(str3)))
+ if ( RegSetValueA(kClsid, "ProgID", REG_SZ, str3, sizeof(str3)))
return E_FAIL;
TCHAR tszFileName[MAX_PATH];
GetModuleFileName(hInst, tszFileName, SIZEOF(tszFileName));
- if ( RegSetValue(k11, _T("InprocServer32"), REG_SZ, tszFileName, lstrlen(tszFileName)))
+ if ( RegSetValue(kClsid, _T("InprocServer32"), REG_SZ, tszFileName, lstrlen(tszFileName)))
return E_FAIL;
- if ( RegSetValueA(k11, "InprocServer32\\ThreadingModel", REG_SZ, str4, sizeof(str4)))
+ if ( RegSetValueA(kClsid, "InprocServer32\\ThreadingModel", REG_SZ, str4, sizeof(str4)))
return E_FAIL;
+ //////////////////////////////////////////////////////////////////////////////////////
+
if ( RegSetValueA(HKEY_CLASSES_ROOT, "*\\shellex\\ContextMenuHandlers\\miranda.shlext", REG_SZ, str2, sizeof(str2)))
return E_FAIL;
if ( RegSetValueA(HKEY_CLASSES_ROOT, "Directory\\shellex\\ContextMenuHandlers\\miranda.shlext", REG_SZ, str2, sizeof(str2)))
return E_FAIL;
+ //////////////////////////////////////////////////////////////////////////////////////
+
HRegKey k2(HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Shell Extensions\\Approved");
if (k2 == NULL)
return E_FAIL;
diff --git a/plugins/ShellExt/src/shlcom.cpp b/plugins/ShellExt/src/shlcom.cpp
index 46a1aebc65..6f659e5280 100644
--- a/plugins/ShellExt/src/shlcom.cpp
+++ b/plugins/ShellExt/src/shlcom.cpp
@@ -1537,10 +1537,6 @@ HRESULT RemoveCOMRegistryEntries()
if ( !RegOpenKeyExA(HKEY_CLASSES_ROOT, "miranda.shlext", 0, KEY_READ, &hRootKey)) {
// need to delete the subkey before the parent key is deleted under NT/2000/XP
RegDeleteKeyA(hRootKey, "CLSID");
- RegDeleteKeyA(hRootKey, "{72013A26-A94C-11d6-8540-A5E62932711D}\\InprocServer32\\ThreadingModel");
- RegDeleteKeyA(hRootKey, "{72013A26-A94C-11d6-8540-A5E62932711D}\\InprocServer32");
- RegDeleteKeyA(hRootKey, "{72013A26-A94C-11d6-8540-A5E62932711D}\\ProgID");
- RegDeleteKeyA(hRootKey, "{72013A26-A94C-11d6-8540-A5E62932711D}");
// close the key
RegCloseKey(hRootKey);
// delete it