[PATCH v2 05/15] propsys: Implement Stg(De)SerializePropVariant
Nikolay Sivov
bunglehead at gmail.com
Sat Jul 18 16:19:00 CDT 2015
On 18.07.2015 19:26, Jonas Kümmerlin wrote:
> +HRESULT WINAPI StgDeserializePropVariant(const SERIALIZEDPROPERTYVALUE *pprop,
> + ULONG cbMax,
> + PROPVARIANT *pvar)
> +{
> + PMemoryAllocator allocator;
> + struct _PMemoryAllocator_vtable vtbl;
> +
> + TRACE("(%p, %lu, %p)\n", pprop, (unsigned long)cbMax, pvar);
I don't think you need that cast.
> +
> + allocator.vt = &vtbl;
> + setup_allocator_vtable(&vtbl);
> +
> + if (!pprop || !pvar)
> + return E_INVALIDARG;
> +
> + __TRY
> + {
> + StgConvertPropertyToVariant(pprop, CP_UNICODE, pvar, &allocator);
> + }
> + __EXCEPT_ALL
Another question is if you need this allocator complexity at all, it's
possible that ole32 call will use CoTaskMem* functions for NULL
allocator pointer, I don't see any tests in ole32/tests for that.
More information about the wine-devel
mailing list