Typelib marshalling BSTRs

Gregory M. Turner gmturner007 at ameritech.net
Tue Jul 22 11:35:14 CDT 2003


On Tuesday 22 July 2003 06:25 am, Mike Hearn wrote:
> On Mon, 2003-07-21 at 17:30, Ove Kaaven wrote:
> > > I found that it's in IDispatch_Invoke_Stub - it calls IDispatch::Invoke
> > > on the actual object and crashes, in native shdocvw code. So, I guess
> > > the inputs its given there are incorrect somehow. I'll look into it
> > > some more.
> >
> > OK.
>
> I found the problem was due to the location of the riid = NULL
> initializer code. For some reason, when the: REFIID riid = NULL; line is
> at the function prologue, assigning to it using *ppMemory doesn't work.
> If the variable is initialized to NULL inside the RPC TryFinally area,
> just before the call to NdrSimpleStructUnmarshall, it works OK.
>
> So, I'm CCing Greg as well, to see if he knows why the Wine SEH code
> might interfere with setting the values like that. As it is, until the
> actual problem is found I just have to remember to edit the midl output.

I was kind of ignoring this as my brain is full with cabinet things ATM...  
but it sure sounds awfully wrong, doesn't it?

./include/rpc.h-54-/* ignore exception handling for now */
./include/rpc.h-55-#define RpcTryExcept if (1) {
./include/rpc.h-56-#define RpcExcept(expr) } else {
./include/rpc.h-57-#define RpcEndExcept }
./include/rpc.h:58:#define RpcTryFinally
./include/rpc.h-59-#define RpcFinally
./include/rpc.h-60-#define RpcEndFinally
./include/rpc.h-61-#define RpcExceptionCode() 0

Considering the implementation, this seems like an awfully bizarre behavior.

Perhaps, this really indicates some kind of problem with the loading / linking 
or the spec.c file or something like that?  Does the behavior change if you 
take out the RpcTryFinally?  I would guess not.

-gmt

-- 
"...he that hath no sword, let him sell his garment, and buy one." 
  - Jesus Christ, Luke 22:36

gmt




More information about the wine-devel mailing list