[PATCH v2 2/5] comsvcs: Add IDispatch support for ISharedPropertyGroupManager.
Nikolay Sivov
nsivov at codeweavers.com
Wed Aug 19 04:29:34 CDT 2020
On 8/19/20 10:48 AM, Jactry Zeng wrote:
> static HRESULT WINAPI group_manager_GetTypeInfo(ISharedPropertyGroupManager *iface, UINT index, LCID lcid, ITypeInfo **info)
> {
> - FIXME("iface %p, index %u, lcid %u, info %p: stub.\n", iface, index, lcid, info);
> - return E_NOTIMPL;
> + HRESULT hr;
> +
> + TRACE("iface %p, index %u, lcid %u, info %p.\n", iface, index, lcid, info);
> +
> + if (index)
> + return DISP_E_BADINDEX;
> +
> + hr = get_typeinfo(ISharedPropertyGroupManager_tid, info);
> + if (SUCCEEDED(hr))
> + ITypeInfo_AddRef(*info);
> + return hr;
> }
get_typeinfo() already addref's, so this will leak.
> static HRESULT WINAPI group_manager_GetIDsOfNames(ISharedPropertyGroupManager *iface, REFIID riid, LPOLESTR *names, UINT count,
> LCID lcid, DISPID *dispid)
> {
> - FIXME("iface %p, riid %s, names %p, count %u, lcid %u, dispid %p: stub.\n",
> + ITypeInfo *typeinfo;
> + HRESULT hr;
> +
> + TRACE("iface %p, riid %s, names %p, count %u, lcid %u, dispid %p.\n",
> iface, debugstr_guid(riid), names, count, lcid, dispid);
>
> - return E_NOTIMPL;
> + hr = get_typeinfo(ISharedPropertyGroupManager_tid, &typeinfo);
> + if (SUCCEEDED(hr))
> + {
> + hr = ITypeInfo_GetIDsOfNames(typeinfo, names, count, dispid);
> + ITypeInfo_Release(typeinfo);
> + }
> +
> + return hr;
> }
This one is fine.
> static HRESULT WINAPI group_manager_Invoke(ISharedPropertyGroupManager *iface, DISPID member, REFIID riid, LCID lcid,
> WORD flags, DISPPARAMS *params, VARIANT *result, EXCEPINFO *except, UINT *argerr)
> {
> - FIXME("iface %p, member %u, riid %s, lcid %u, flags %x, params %p, result %p, except %p, argerr %p: stub.\n",
> + ITypeInfo *typeinfo;
> + HRESULT hr;
> +
> + TRACE("iface %p, member %u, riid %s, lcid %u, flags %x, params %p, result %p, except %p, argerr %p.\n",
> iface, member, debugstr_guid(riid), lcid, flags, params, result, except, argerr);
> - return E_NOTIMPL;
> +
> + hr = get_typeinfo(ISharedPropertyGroupManager_tid, &typeinfo);
> + if (SUCCEEDED(hr))
> + hr = ITypeInfo_Invoke(typeinfo, iface, member, flags, params, result, except, argerr);
> + return hr;
> }
This one is not.
More information about the wine-devel
mailing list