Problem with ITypeInfo

jack jack at itma.pwr.wroc.pl
Sat Aug 7 19:51:46 CDT 2004


Hi.

I've tryed to run game Project Entropia and I got segmentation fault 
because of a bug in OLE.
I've hacked code and I found two bugs:

1. ITypeInfo has back pointer to ITypeLib, but it's possible (and 
happened) that ITypeLib is
destroyed and later ITypeInfo calls its function. I've solve this 
problem by call ITypeLib_AddRef
while creating ITypeInfo (and ITypeLib_Release while destroying ITypeInfo).

2. ITypeInfo_Invoke doesn't support optional parameters. I've added 
support for cParamsOpt>0.
MSDN says that optional parameter is when VARTYPE equals VT_EMPTY, but 
in my case
it was a VT_BYREF | VT_VARIANT type but the pointer was NULL. When I 
treated it as
VT_EMPTY, it was OK.

I enclose my patch. My knownlage about OLE is sparse so I'm not able to 
test this.

Thanks,
Jacek
-------------- next part --------------
A non-text attachment was scrubbed...
Name: typelib.diff
Type: text/x-patch
Size: 2249 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-devel/attachments/20040808/e4acd679/typelib.bin


More information about the wine-devel mailing list