[PATCH v3] ole32: Implement CreateObjrefMoniker().

Dmitry Timoshkov dmitry at baikal.ru
Wed Oct 13 12:42:22 CDT 2021


Thanks for the review.

Nikolay Sivov <nsivov at codeweavers.com> wrote:

> >  dlls/ole32/moniker.h        |   4 +-
> >  dlls/ole32/ole32.spec       |   2 +-
> >  dlls/ole32/ole32_objidl.idl |   6 +
> >  dlls/ole32/oleproxy.c       |  13 +
> >  dlls/ole32/pointermoniker.c | 531 +++++++++++++++++++++++++++++++++++-
> >  dlls/ole32/tests/moniker.c  | 221 ++++++++++++++-
> >  include/objidl.idl          |   5 +-
> >  7 files changed, 776 insertions(+), 6 deletions(-)
> 
> Does not have to be in the same file either. This will avoid multiple
> *_impl_from_* helpers.

I recall that Alexandre prefers to add stuff to existing files if the scope
and size keep it managable. I'd guess that's the case here.

> > +static HRESULT WINAPI ObjrefMonikerImpl_ParseDisplayName(IMoniker *iface, IBindCtx *pbc,
> > +        IMoniker *left, LPOLESTR name, ULONG *eaten, IMoniker **out)
> > +{
> > +    ObjrefMonikerImpl *moniker = objref_impl_from_IMoniker(iface);
> > +    HRESULT hr;
> > +    IParseDisplayName *pdn;
> > +
> > +    TRACE("(%p,%p,%p,%p,%p,%p)\n", iface, pbc, left, name, eaten, out);
> > +
> > +    if (left)
> > +        return MK_E_SYNTAX;
> > +
> > +    if (!moniker->pObject)
> > +        return E_UNEXPECTED;
> > +
> > +    hr = IUnknown_QueryInterface(moniker->pObject, &IID_IParseDisplayName, (void **)&pdn);
> > +    if (FAILED(hr))
> > +        return hr;
> > +
> > +    hr = IParseDisplayName_ParseDisplayName(pdn, pbc, name, eaten, out);
> > +    IParseDisplayName_Release(pdn);
> > +
> > +    return hr;
> > +}
> Any evidence of it actually doing this? In general, let's leave more
> stubs than copies of pointer moniker methods, unless it's clearly a
> right thing to do. For BindTo* methods that I suspect you actually need,
> calling then semi-stub is better.

Well, that's a fair point, and probably sending a stub implementation first
might be a better starting point for an initial patch.

-- 
Dmitry.



More information about the wine-devel mailing list