diff --git a/dlls/qcap/dllsetup.c b/dlls/qcap/dllsetup.c index 8de99ece1a2..ad3d84c4f7d 100644 --- a/dlls/qcap/dllsetup.c +++ b/dlls/qcap/dllsetup.c @@ -54,37 +54,6 @@ static WCHAR const tmodel_keyname[15] = 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() */ @@ -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);