Commit c192885d authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

ole32: Missing MiscStatus key is not a failure for OleRegGetMiscStatus().

parent 1b9fac3b
......@@ -882,11 +882,6 @@ HRESULT WINAPI OleRegGetMiscStatus(
LONG result;
/*
* Initialize the out parameter.
*/
*pdwStatus = 0;
/*
* Build the key name we're looking for
*/
sprintfW( keyName, clsidfmtW,
......@@ -896,6 +891,10 @@ HRESULT WINAPI OleRegGetMiscStatus(
TRACE("(%s, %d, %p)\n", debugstr_w(keyName), dwAspect, pdwStatus);
if (!pdwStatus) return E_INVALIDARG;
*pdwStatus = 0;
/*
* Open the class id Key
*/
......@@ -910,7 +909,7 @@ HRESULT WINAPI OleRegGetMiscStatus(
if (result != ERROR_SUCCESS)
{
RegCloseKey(clsidKey);
return REGDB_E_READREGDB;
return S_OK;
}
/*
......
......@@ -1732,18 +1732,41 @@ static void test_OleRegGetMiscStatus(void)
DWORD status;
HRESULT hr;
hr = OleRegGetMiscStatus(&CLSID_Testclass, DVASPECT_ICON, NULL);
ok(hr == E_INVALIDARG, "got 0x%08x\n", hr);
status = 0xdeadbeef;
hr = OleRegGetMiscStatus(&CLSID_Testclass, DVASPECT_ICON, &status);
ok(hr == REGDB_E_CLASSNOTREG, "got 0x%08x\n", hr);
ok(status == 0, "got 0x%08x\n", status);
status = -1;
hr = OleRegGetMiscStatus(&CLSID_StdFont, DVASPECT_ICON, &status);
ok(hr == S_OK, "got 0x%08x\n", hr);
ok(status == 0, "got 0x%08x\n", status);
if ((handle = activate_context(actctx_manifest, &cookie)))
{
status = 0;
hr = OleRegGetMiscStatus(&CLSID_Testclass, DVASPECT_ICON, &status);
todo_wine {
ok(hr == S_OK, "got 0x%08x\n", hr);
ok(status == OLEMISC_RECOMPOSEONRESIZE, "got 0x%08x\n", status);
}
/* context data takes precedence over registration info */
status = 0;
hr = OleRegGetMiscStatus(&CLSID_StdFont, DVASPECT_ICON, &status);
ok(hr == S_OK, "got 0x%08x\n", hr);
todo_wine
ok(status == OLEMISC_RECOMPOSEONRESIZE, "got 0x%08x\n", status);
/* there's no such attribute in context */
status = -1;
hr = OleRegGetMiscStatus(&CLSID_Testclass, DVASPECT_DOCPRINT, &status);
todo_wine
ok(hr == S_OK, "got 0x%08x\n", hr);
ok(status == 0, "got 0x%08x\n", status);
pDeactivateActCtx(0, cookie);
pReleaseActCtx(handle);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment