shdocvw: Take the riid parameter to TaskbarList_Create() into account.

This commit is contained in:
Henri Verbeet 2009-06-16 09:38:25 +02:00 committed by Alexandre Julliard
parent 936713fe33
commit 697e529c19

View file

@ -130,12 +130,14 @@ static const struct ITaskbarListVtbl taskbar_list_vtbl =
HRESULT TaskbarList_Create(IUnknown *outer, REFIID riid, void **taskbar_list)
{
struct taskbar_list *object;
HRESULT hr;
TRACE("outer %p, riid %s, taskbar_list %p\n", outer, debugstr_guid(riid), taskbar_list);
if (outer)
{
WARN("Aggregation not supported\n");
*taskbar_list = NULL;
return CLASS_E_NOAGGREGATION;
}
@ -143,15 +145,21 @@ HRESULT TaskbarList_Create(IUnknown *outer, REFIID riid, void **taskbar_list)
if (!object)
{
ERR("Failed to allocate taskbar list object memory\n");
*taskbar_list = NULL;
return E_OUTOFMEMORY;
}
object->lpVtbl = &taskbar_list_vtbl;
object->refcount = 1;
*taskbar_list = object;
object->refcount = 0;
TRACE("Created ITaskbarList %p\n", object);
hr = ITaskbarList_QueryInterface((ITaskbarList *)object, riid, taskbar_list);
if (FAILED(hr))
{
HeapFree(GetProcessHeap(), 0, object);
return hr;
}
return S_OK;
}