Commit 959814a3 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

ole32: Fix QueryInterface for IErrorInfo to return IUnknown pointer.

parent fa4db6d9
......@@ -160,7 +160,7 @@ static HRESULT WINAPI IErrorInfoImpl_QueryInterface(
*ppvoid = NULL;
if(IsEqualIID(riid, &IID_IErrorInfo))
if (IsEqualIID(riid, &IID_IUnknown) || IsEqualIID(riid, &IID_IErrorInfo))
{
*ppvoid = &This->IErrorInfo_iface;
}
......
......@@ -47,10 +47,15 @@ static void test_error_info(void)
static WCHAR wszDescription[] = {'F','a','i','l','e','d',' ','S','p','r','o','c','k','e','t',0};
static WCHAR wszHelpFile[] = {'s','p','r','o','c','k','e','t','.','h','l','p',0};
static WCHAR wszSource[] = {'s','p','r','o','c','k','e','t',0};
IUnknown *unk;
hr = CreateErrorInfo(&pCreateErrorInfo);
ok_ole_success(hr, "CreateErrorInfo");
hr = ICreateErrorInfo_QueryInterface(pCreateErrorInfo, &IID_IUnknown, (void**)&unk);
ok_ole_success(hr, "QI");
IUnknown_Release(unk);
hr = ICreateErrorInfo_SetDescription(pCreateErrorInfo, NULL);
ok_ole_success(hr, "ICreateErrorInfo_SetDescription");
......@@ -78,6 +83,10 @@ static void test_error_info(void)
hr = ICreateErrorInfo_QueryInterface(pCreateErrorInfo, &IID_IErrorInfo, (void **)&pErrorInfo);
ok_ole_success(hr, "ICreateErrorInfo_QueryInterface");
hr = IErrorInfo_QueryInterface(pErrorInfo, &IID_IUnknown, (void**)&unk);
ok_ole_success(hr, "QI");
IUnknown_Release(unk);
ICreateErrorInfo_Release(pCreateErrorInfo);
hr = SetErrorInfo(0, pErrorInfo);
......
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