Alexander Dorofeyev : quartz: Fix registry key creation.
Alexandre Julliard
julliard at winehq.org
Tue Jul 1 08:27:45 CDT 2008
Module: wine
Branch: master
Commit: f9e2914ed6780ec88b64c7f00d2a10ae41f7068b
URL: http://source.winehq.org/git/wine.git/?a=commit;h=f9e2914ed6780ec88b64c7f00d2a10ae41f7068b
Author: Alexander Dorofeyev <alexd4 at inbox.lv>
Date: Sun Jun 29 15:07:49 2008 +0300
quartz: Fix registry key creation.
---
dlls/quartz/filtermapper.c | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/dlls/quartz/filtermapper.c b/dlls/quartz/filtermapper.c
index 0676e90..bc8d4c8 100644
--- a/dlls/quartz/filtermapper.c
+++ b/dlls/quartz/filtermapper.c
@@ -1440,8 +1440,12 @@ static HRESULT WINAPI FilterMapper_RegisterPin(
if (SUCCEEDED(hr))
{
- lRet = RegCreateKeyExW(hPinsKey, wszTypes, 0, NULL, REG_OPTION_NON_VOLATILE, KEY_WRITE, NULL, NULL, NULL);
+ HKEY hkeyDummy = NULL;
+
+ lRet = RegCreateKeyExW(hPinsKey, wszTypes, 0, NULL, REG_OPTION_NON_VOLATILE, KEY_WRITE, NULL, &hkeyDummy, NULL);
hr = HRESULT_FROM_WIN32(lRet);
+
+ if (hkeyDummy) RegCloseKey(hkeyDummy);
}
CoTaskMemFree(wszClsid);
@@ -1511,13 +1515,17 @@ static HRESULT WINAPI FilterMapper_RegisterPinType(
if (SUCCEEDED(hr))
{
+ HKEY hkeyDummy = NULL;
+
strcpyW(wszKeyName, wszClsidMajorType);
strcatW(wszKeyName, wszSlash);
strcatW(wszKeyName, wszClsidSubType);
- lRet = RegCreateKeyExW(hKey, wszKeyName, 0, NULL, REG_OPTION_NON_VOLATILE, KEY_WRITE, NULL, NULL, NULL);
+ lRet = RegCreateKeyExW(hKey, wszKeyName, 0, NULL, REG_OPTION_NON_VOLATILE, KEY_WRITE, NULL, &hkeyDummy, NULL);
hr = HRESULT_FROM_WIN32(lRet);
CloseHandle(hKey);
+
+ if (hkeyDummy) RegCloseKey(hkeyDummy);
}
CoTaskMemFree(wszClsid);
More information about the wine-cvs
mailing list