summaryrefslogtreecommitdiff
path: root/plugins/ShellExt/src/main.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-08-29 20:53:23 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-08-29 20:53:23 +0000
commit552985214842965925143997a08fe98baf738679 (patch)
tree607340c0780a0076e21d5429f1a13d6b53ebe677 /plugins/ShellExt/src/main.cpp
parentc5f30ade3d3f2a9a3ba3952230a7f625f81b93ca (diff)
- logging disabled for the future times
- fixed crash when groups are enabled; - fixed incompatibility with Windows 7's Explorer; - correct error codes for COM; - version bump git-svn-id: http://svn.miranda-ng.org/main/trunk@5886 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/ShellExt/src/main.cpp')
-rw-r--r--plugins/ShellExt/src/main.cpp22
1 files changed, 7 insertions, 15 deletions
diff --git a/plugins/ShellExt/src/main.cpp b/plugins/ShellExt/src/main.cpp
index 08050b22ea..33d1ed0b83 100644
--- a/plugins/ShellExt/src/main.cpp
+++ b/plugins/ShellExt/src/main.cpp
@@ -3,7 +3,7 @@
HINSTANCE hInst;
int hLangpack;
-static TCHAR tszLogPath[MAX_PATH];
+TCHAR tszLogPath[MAX_PATH];
PLUGININFOEX pluginInfoEx = {
sizeof(PLUGININFOEX),
@@ -81,11 +81,15 @@ STDAPI DllRegisterServer()
if ( RegSetValueA(kClsid, "ProgID", REG_SZ, str3, sizeof(str3)))
return E_FAIL;
+ HRegKey kInprocServer(kClsid, "InprocServer32");
+ if (kInprocServer == NULL)
+ return E_FAIL;
+
TCHAR tszFileName[MAX_PATH];
GetModuleFileName(hInst, tszFileName, SIZEOF(tszFileName));
- if ( RegSetValue(kClsid, _T("InprocServer32"), REG_SZ, tszFileName, lstrlen(tszFileName)))
+ if ( RegSetValueEx(kInprocServer, NULL, 0, REG_SZ, (LPBYTE)tszFileName, sizeof(TCHAR)*(lstrlen(tszFileName)+1)))
return E_FAIL;
- if ( RegSetValueA(kClsid, "InprocServer32\\ThreadingModel", REG_SZ, str4, sizeof(str4)))
+ if ( RegSetValueExA(kInprocServer, "ThreadingModel", 0, REG_SZ, (PBYTE)str4, sizeof(str4)))
return E_FAIL;
//////////////////////////////////////////////////////////////////////////////////////
@@ -113,18 +117,6 @@ STDAPI DllUnregisterServer()
/////////////////////////////////////////////////////////////////////////////////////////
-void logA(const char *format, ...)
-{
- FILE *out = _tfopen(tszLogPath, _T("a+"));
- if (out) {
- va_list args;
- va_start(args, format);
- vfprintf(out, format, args);
- va_end(args);
- fclose(out);
- }
-}
-
extern "C" __declspec(dllexport) int Load(void)
{
mir_getLP(&pluginInfoEx);