mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-06 04:30:57 +00:00
ole32: Missing MiscStatus key is not a failure for OleRegGetMiscStatus().
This commit is contained in:
parent
1b9fac3b3d
commit
c192885df4
|
@ -881,11 +881,6 @@ HRESULT WINAPI OleRegGetMiscStatus(
|
|||
HKEY aspectKey;
|
||||
LONG result;
|
||||
|
||||
/*
|
||||
* Initialize the out parameter.
|
||||
*/
|
||||
*pdwStatus = 0;
|
||||
|
||||
/*
|
||||
* Build the key name we're looking for
|
||||
*/
|
||||
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue