> Subject: Re: Typelib marshalling BSTRs > From: Mike Hearn <[EMAIL PROTECTED]> > To: "Gregory M. Turner" <[EMAIL PROTECTED]> > Cc: [EMAIL PROTECTED] > Date: 23 Jul 2003 16:28:58 +0100 > > So, moving on from that problem, I think my woes (currently) are caused > by the NDR engine not handling VT_DISPATCH variants. > > in wire_size(): > case VT_DISPATCH: > FIXME("wire-size interfaces\n"); > > that causes VARIANT_UserMarshal to skip doing anything special for > VT_DISPATCH variants, when I think in reality, it should call > NdrInterfacePointerMarshall (btw, what's up with two spellings of > "marshal"?) to get the IDispatch* into the stream.
I don't know about NdrInterfacePointerMarshall, but I don't think it should get there to start with (see below). BTW, I think the two spellings depends on whether the word is used as a verb or as a noun. > While rather roundabout, I think it seems clear that this is what's > needed. The problem then becomes one of NdrInterfacePointerMarshall() > needing information that isn't available from inside > VARIANT_UserMarshal, like the MIDL_STUB_BUFFER pointer. > > Greg, as you are the relevant Guru here and Ove is probably a bit pissed > off with all my questions, what should we be doing here? If we are meant > to use NdrInterfacePointerMarshall to handle VT_DISPATCH variants, how > do we get the args it needs? Ok, my name's not Greg or Ove, but I'll have a go anyway. I think the code should not try to marshal/unmarshal the data in rpcrt4, but should use the PSOAInterface code in oleaut32 (according to the registry entry for Interfaces\[CLSID of IWebBrowser2]\ProxyStubClsid32). It would probably be best to find out why this is not happening (maybe by moving some oleaut32 code to rpcrt4?). Rob