diff options
author | George Hazan <george.hazan@gmail.com> | 2013-08-25 12:39:32 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-08-25 12:39:32 +0000 |
commit | 0af561c5f6618bd5431e6ff15c00dd989ad3dc49 (patch) | |
tree | c238f9390d83b82c4b1c1b8be42a3732ab411610 /plugins | |
parent | 9360ee313ff383f63ce55334a10a4a64cfe0a96f (diff) |
fix for setting the Approved setting
git-svn-id: http://svn.miranda-ng.org/main/trunk@5826 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/ShellExt/src/main.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/ShellExt/src/main.cpp b/plugins/ShellExt/src/main.cpp index 2dea9412ed..daf43b62a0 100644 --- a/plugins/ShellExt/src/main.cpp +++ b/plugins/ShellExt/src/main.cpp @@ -57,8 +57,8 @@ TCHAR key1[] = _T("miranda.shlext\\{72013A26-A94C-11d6-8540-A5E62932711D}\\Inpro STDAPI DllRegisterServer()
{
- sprintf_s(str1, sizeof(str1), "shlext %d.%d.%d.%d - shell context menu support for Miranda NG", __FILEVERSION_STRING);
- if ( RegSetValueA(HKEY_CLASSES_ROOT, "miranda.shlext", REG_SZ, str1, sizeof(str1)))
+ int str1len = sprintf_s(str1, sizeof(str1), "shlext %d.%d.%d.%d - shell context menu support for Miranda NG", __FILEVERSION_STRING);
+ if ( RegSetValueA(HKEY_CLASSES_ROOT, "miranda.shlext", REG_SZ, str1, str1len))
return E_FAIL;
if ( RegSetValueA(HKEY_CLASSES_ROOT, "miranda.shlext\\CLSID", REG_SZ, str2, sizeof(str2)))
return E_FAIL;
@@ -86,7 +86,7 @@ STDAPI DllRegisterServer() HRegKey k2(HKEY_LOCAL_MACHINE, _T("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Shell Extensions\\Approved"));
if (k2 == NULL)
return E_FAIL;
- if ( RegSetValueA(k2, str2, REG_SZ, str1, sizeof(str1)))
+ if ( RegSetValueExA(k2, str2, 0, REG_SZ, (PBYTE)str1, str1len))
return E_FAIL;
return S_OK;
|