[PATCH 3/6] ole32, propsys: Rework PROPVARIANT (de)serialization

Jonas Kümmerlin rgcjonas at gmail.com
Thu Jul 16 03:09:06 CDT 2015


Nikolay Sivov wrote:
> On 14.07.2015 22:47, Jonas Kümmerlin wrote:
> > +@ stdcall wine_WritePropertyToBuffer(ptr ptr long ptr long long)
> > +@ stdcall wine_SerializedPropertySize(ptr ptr long long)
> > +@ stdcall wine_ReadProperty(ptr ptr long ptr long long ptr ptr)
> 
> We avoid custom exports, unless there's absolutely no way to go 
> without 
> them. If you're sure public API is not enough, you should consider 
> duplication of relevant parts.

The problem at hand:
      * propsys.dll has to do property serialization/deserialization,
        at least for getting Stg(De)SerializePropVariant() to work.
      * Implementing it twice is not really appealing since it amounts
        to >1000 lines of code.
      * The only interface to property (de)serialization provided by
        ole32.dll, the StgConvertVariantToProperty()/
        StgConvertPropertyToVariant() functions, are poorly documented,
        hard to implement (HRESULTs need to be converted to NTSTATUS
        exceptions) and even more unpleasant to use (because one would
        need to catch the NTSTATUS exception and convert it back to a
        HRESULT). This is rather crazy and cumbersome.

How about moving Stg(De)SerializePropVariant() into OLE32.dll and
reexporting it from propsys.dll? That could solve the problem without
introducing a completely new API.



More information about the wine-devel mailing list