[PATCH v2 4/4] propsys: Implement PropVariantToBuffer().
Nikolay Sivov
nsivov at codeweavers.com
Fri Feb 15 03:02:38 CST 2019
On 2/15/19 11:57 AM, Jactry Zeng wrote:
> Hi Nikolay,
>
> Thanks for review!
>
> On Fri, Feb 15, 2019 at 8:34 AM Nikolay Sivov <nsivov at codeweavers.com
> <mailto:nsivov at codeweavers.com>> wrote:
> >
> > > +HRESULT WINAPI PropVariantToBuffer(REFPROPVARIANT propvarIn, void
> *ret, UINT cb)
> > > +{
> > > + TRACE("(%p, %p, %d)\n", propvarIn, ret, cb);
> > > +
> > > + if(cb > propvarIn->u.caub.cElems)
> > > + return E_FAIL;
> > > +
> > > + memcpy(ret, propvarIn->u.caub.pElems, cb);
> > > +
> > > + return S_OK;
> > > +}
> >
> > This one should probably check variant type.
> >
> Well, I've thought about this. From MSDN it said that it only supports
> VT_VECTOR | VT_UI1 and VT_ARRRAY | VT_UI1. In order to verify this, we
> will need to test many other types. So it maybe better to just ignore
> type checking at this point and adding it in the future if a real
> application requests it?
For first version you only need to test what's documented, and maybe
VT_I1 too, leaving WARN for other types. Right now you're assuming it's
a vector, and assuming element size too.
>
>
> --
> Regards,
> Jactry Zeng
More information about the wine-devel
mailing list