SHELL32: Use ShellLink_QueryInterface to return the right
interface in IShellLink_Constructor.
Alexandre Julliard
julliard at winehq.org
Mon Oct 17 04:04:37 CDT 2005
Mike McCormack <mike at codeweavers.com> writes:
> @@ -1176,18 +1176,7 @@ HRESULT WINAPI IShellLink_Constructor( I
>
> TRACE("(%p)->()\n",sl);
>
> - if (IsEqualIID(riid, &IID_IUnknown) ||
> - IsEqualIID(riid, &IID_IShellLinkA))
> - *ppv = sl;
> - else if (IsEqualIID(riid, &IID_IShellLinkW))
> - *ppv = &(sl->lpvtblw);
> - else {
> - LocalFree((HLOCAL)sl);
> - ERR("E_NOINTERFACE\n");
> - return E_NOINTERFACE;
> - }
> -
> - return S_OK;
> + return ShellLink_QueryInterface( sl, riid, ppv );
This will leak the object if QueryInterface fails.
--
Alexandre Julliard
julliard at winehq.org
More information about the wine-devel
mailing list