Re: [PATCH v4 0/2] MR7539: combase : clsid_from_string_reg() add read of CurVer key value.
Nikolay Sivov (@nsivov) commented about dlls/ole32/tests/compobj.c:
ok(IsEqualCLSID(&clsid, &CLSID_StdFont), "clsid wasn't equal to CLSID_StdFont\n");
/* test some failure cases */ + StringFromGUID2(&CLSID_non_existent, clsidstr, ARRAYSIZE(clsidstr)); + if (RegCreateKeyExW(HKEY_CLASSES_ROOT, L"MyApp.DocumentTest\\CurVer", 0, NULL, 0, KEY_ALL_ACCESS, NULL, &hKey, NULL) == ERROR_SUCCESS) { + RegSetValueExW(hKey, NULL, 0, REG_SZ, (const BYTE *)L"MyApp.DocumentTest.1", (wcslen(L"MyApp.DocumentTest.1") + 1) * sizeof(WCHAR)); + RegCloseKey(hKey); + } + if (RegCreateKeyExW(HKEY_CLASSES_ROOT, L"MyApp.DocumentTest.1\\CLSID", 0, NULL, 0, KEY_ALL_ACCESS, NULL, &hKey, NULL) == ERROR_SUCCESS) { + RegSetValueExW(hKey, NULL, 0, REG_SZ, (const BYTE *)clsidstr, (wcslen(clsidstr) + 1) * sizeof(WCHAR)); + RegCloseKey(hKey); + } + hr = CLSIDFromProgID(L"MyApp.DocumentTest", &clsid); + ok(hr == S_OK, "CLSIDFromProgID failed with error 0x%08lx\n", hr); + ok(IsEqualCLSID(&clsid, &CLSID_non_existent), "got wrong clsid %s\n", wine_dbgstr_guid(&clsid));
This needs a test for when both CurVer and CLSID are present. The test should clean up entries it creates. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/7539#note_115149
participants (1)
-
Nikolay Sivov (@nsivov)