mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-16 05:26:43 +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;
|
HKEY aspectKey;
|
||||||
LONG result;
|
LONG result;
|
||||||
|
|
||||||
/*
|
|
||||||
* Initialize the out parameter.
|
|
||||||
*/
|
|
||||||
*pdwStatus = 0;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Build the key name we're looking for
|
* 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);
|
TRACE("(%s, %d, %p)\n", debugstr_w(keyName), dwAspect, pdwStatus);
|
||||||
|
|
||||||
|
if (!pdwStatus) return E_INVALIDARG;
|
||||||
|
|
||||||
|
*pdwStatus = 0;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Open the class id Key
|
* Open the class id Key
|
||||||
*/
|
*/
|
||||||
|
@ -910,7 +909,7 @@ HRESULT WINAPI OleRegGetMiscStatus(
|
||||||
if (result != ERROR_SUCCESS)
|
if (result != ERROR_SUCCESS)
|
||||||
{
|
{
|
||||||
RegCloseKey(clsidKey);
|
RegCloseKey(clsidKey);
|
||||||
return REGDB_E_READREGDB;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -1732,18 +1732,41 @@ static void test_OleRegGetMiscStatus(void)
|
||||||
DWORD status;
|
DWORD status;
|
||||||
HRESULT hr;
|
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);
|
hr = OleRegGetMiscStatus(&CLSID_Testclass, DVASPECT_ICON, &status);
|
||||||
ok(hr == REGDB_E_CLASSNOTREG, "got 0x%08x\n", hr);
|
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)))
|
if ((handle = activate_context(actctx_manifest, &cookie)))
|
||||||
{
|
{
|
||||||
|
|
||||||
status = 0;
|
status = 0;
|
||||||
hr = OleRegGetMiscStatus(&CLSID_Testclass, DVASPECT_ICON, &status);
|
hr = OleRegGetMiscStatus(&CLSID_Testclass, DVASPECT_ICON, &status);
|
||||||
todo_wine {
|
todo_wine {
|
||||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||||
ok(status == OLEMISC_RECOMPOSEONRESIZE, "got 0x%08x\n", status);
|
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);
|
pDeactivateActCtx(0, cookie);
|
||||||
pReleaseActCtx(handle);
|
pReleaseActCtx(handle);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue