[Bug 20641] New: Problems loading dispatch and dual types in SLTG TypeLibs
wine-bugs at winehq.org
wine-bugs at winehq.org
Mon Nov 9 22:30:38 CST 2009
Summary: Problems loading dispatch and dual types in SLTG
AssignedTo: wine-bugs at winehq.org
ReportedBy: sunilmohan at fsf.org.in
Created an attachment (id=24631)
MS Oleviewer showing the typelib on Wine and Windows
When I tried to run a Visual Basic 6.0 application that uses Crystal Reports
8.5 ActiveX control, multiple problems popped up. The end result was that
invoking a method turns into an error that the method requested for could not
The attached screenshots best describe the problem. First screenshot shows
oleviewer displaying information about the typelib for the mentioned ocx
control on Wine and on Windows. The dispatch interface "CrystalReportEvents" is
not shown as being derived from IDispatch. And the dual types "IRowCursor" and
"CrystalCtl" as shown simply as interfaces.
The second screenshot shows a simple test application on Wine and on Windows.
We can see that TypeInfo members returned by Wine differ at many places
compared to the TypeInfo returned by Windows. Of interest is the type kind for
descriptions #0 and #7. Also the no. of interfaces implemented by description
I have patches that fix these two problems. With the patches all TypeInfo
members appear similar to the Windows output (except lcid). I am posting the
patches on wine-patches list.
Patch 1: Type descriptions of type kind DISPATCH can actually inherit from one
interface instead of specifying methods and properties according to MSDN. The
SLTG parser does not seem to handle this. I added code to read information
about inherited interfaces in DISPATCH types when available.
Patch 2: The documentation says that dual interfaces which implement both
INTERFACE and DISPATCH have to be returned first as DISPATCH types and then
INTERFACE type will be returned when calls to GetRefTypeOfImplType and
GetRefTypeInfo are made with -1 index. Clients are supposed to check for DUAL
flag and read the second type info accordingly. However, in SLTG typelib above,
the two dual types have type kind INTERFACE set on them. We must be returning
DISPATCH type first and then later the INTERFACE. So, I added code to return a
DUAL interface as DISPATCH type first in the SLTG parser. This fixes other
problems such as removing the AUTOMATION flag in the returned description and
proper function count.
Patch 3: I removed a check for DISPATCHABLE flag when GetRefTypeOfImplType is
called with -1 index for the following reasons. DUAL which is already being
checked for implies DISPATCHABLE. The SLTG type library being dealt with has
dual types without this flag set. The flag is a computed one and not present in
Patch 4: Updated a comment about a newly seen value in SLTG typelib that was
thought of to be constant.
After the fixes, our test case using the above activex seems to run fine. I ran
the tests but they don't seem to contain any SLTG library parsing tests.
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
Do not reply to this email, post in Bugzilla using the
above URL to reply.
------- You are receiving this mail because: -------
You are watching all bug changes.
More information about the wine-bugs