[PATCH v3 2/3] uiautomationcore: Implement UiaGetReservedMixedAttributeValue.

Connor McAdams cmcadams at codeweavers.com
Fri Oct 29 08:07:50 CDT 2021


On Fri, Oct 29, 2021 at 03:45:27PM +0300, Nikolay Sivov wrote:
> 
> 
> On 10/28/21 10:50 PM, Connor McAdams wrote:
> > Signed-off-by: Connor McAdams <cmcadams at codeweavers.com>
> > ---
> >  dlls/uiautomationcore/uia_main.c | 44 ++++++++++++++++++++++++++++++--
> >  1 file changed, 42 insertions(+), 2 deletions(-)
> >
> > diff --git a/dlls/uiautomationcore/uia_main.c b/dlls/uiautomationcore/uia_main.c
> > index 01d5ba67a88..7966e1cf730 100644
> > --- a/dlls/uiautomationcore/uia_main.c
> > +++ b/dlls/uiautomationcore/uia_main.c
> > @@ -144,6 +144,41 @@ static const IUnknownVtbl uia_reserved_ns_vtbl = {
> >  
> >  static IUnknown uia_reserved_ns_iface = {&uia_reserved_ns_vtbl};
> >  
> > +/*
> > + * UiaReservedMixedAttribute object.
> > + */
> > +static HRESULT WINAPI uia_reserved_ma_QueryInterface(IUnknown *iface,
> > +        REFIID riid, void **ppv)
> > +{
> > +    *ppv = NULL;
> > +    if (IsEqualIID(riid, &IID_IUnknown))
> > +        *ppv = iface;
> > +    else if (IsEqualIID(riid, &IID_IMarshal))
> > +        return uia_rsrv_obj_create_marshal_wrapper(iface, ppv);
> > +    else
> > +        return E_NOINTERFACE;
> > +
> > +    return S_OK;
> > +}
> > +
> > +static ULONG WINAPI uia_reserved_ma_AddRef(IUnknown *iface)
> > +{
> > +    return 1;
> > +}
> > +
> > +static ULONG WINAPI uia_reserved_ma_Release(IUnknown *iface)
> > +{
> > +    return 1;
> > +}
> > +
> > +static const IUnknownVtbl uia_reserved_ma_vtbl = {
> > +    uia_reserved_ma_QueryInterface,
> > +    uia_reserved_ma_AddRef,
> > +    uia_reserved_ma_Release,
> > +};
> 
> Why do you need to duplicate methods and vtable, if it's identical to
> *_reserved_ns_* ?
>

I guess I really don't, I was thinking more in terms of comparing lpVtbl
values, but since what actually gets compared is the pointer value of
the IUnknown, they can have identical vtables. I'll fix this and send a
new version.



More information about the wine-devel mailing list