Stefan Leichter : qcap: Replace DeleteEntireSubKey with
RegDeleteTreeW.
Alexandre Julliard
julliard at wine.codeweavers.com
Tue Jun 5 05:48:19 CDT 2007
Module: wine
Branch: master
Commit: 163815180a79949de42f03f9d231a008e1da4610
URL: http://source.winehq.org/git/wine.git/?a=commit;h=163815180a79949de42f03f9d231a008e1da4610
Author: Stefan Leichter <Stefan.Leichter at camline.com>
Date: Mon Jun 4 22:30:02 2007 +0200
qcap: Replace DeleteEntireSubKey with RegDeleteTreeW.
---
dlls/qcap/dllsetup.c | 33 +--------------------------------
1 files changed, 1 insertions(+), 32 deletions(-)
diff --git a/dlls/qcap/dllsetup.c b/dlls/qcap/dllsetup.c
index 8de99ec..ad3d84c 100644
--- a/dlls/qcap/dllsetup.c
+++ b/dlls/qcap/dllsetup.c
@@ -55,37 +55,6 @@ static WCHAR const tmodel_both[] =
{'B','o','t','h',0};
/*
- * Delete a key and all its subkeys
- */
-static HRESULT DeleteEntireSubKey(HKEY hkey, LPWSTR strSubKey)
-{
- WCHAR buffer[MAX_KEY_LEN];
- DWORD dw = MAX_KEY_LEN;
- FILETIME ft;
- HKEY hk;
- LONG ret = RegOpenKeyExW(hkey, strSubKey, 0, MAXIMUM_ALLOWED, &hk);
-
- if (ERROR_SUCCESS == ret)
- {
- /* Keep on enumerating the first key and deleting that */
- for( ; ; )
- {
- dw = MAX_KEY_LEN;
-
- ret = RegEnumKeyExW(hk, 0, buffer, &dw, NULL, NULL, NULL, &ft);
-
- if (ERROR_SUCCESS == ret)
- DeleteEntireSubKey(hk, buffer);
- else
- break;
- }
- RegCloseKey(hk);
- RegDeleteKeyW(hkey, strSubKey);
- }
- return NOERROR;
-}
-
-/*
* SetupRegisterClass()
*/
static HRESULT SetupRegisterClass(HKEY clsid, LPCWSTR szCLSID,
@@ -252,7 +221,7 @@ static HRESULT SetupRegisterAllClasses(const CFactoryTemplate * pList, int num,
pList->m_Name, szFileName,
ips32_keyname, tmodel_both);
else
- hr = DeleteEntireSubKey(hkey, szCLSID);
+ hr = RegDeleteTreeW(hkey, szCLSID);
}
}
RegCloseKey(hkey);
More information about the wine-cvs
mailing list