General XMetaL Discussion
wongsk27 April 22, 2010 at 7:11 am
Problem with xmetal55.tlb fileApril 22, 2010 at 7:11 amParticipants 2Replies 3Last Activity 12 years, 5 months ago
Recently, I recompiled my XMetaL plugin component with XMetaL55.tlb file(the component was written in C#). When I recomplie with XMetaL55.tlb, I got the error from Visual studio say “'XMetaL.CommandBarPopup' does not contain a definition for 'get_Caption'”, then I went to check the XMetaL55.tlb file with tlb viewer. I discovered that the CommandBarPopup.Caption property (In XMetaL 5.0, it is listed as CommandBarPopup.Caption) becomes CommandBarPopup.caption which starting with a lower case “c”. Since my component need to work in both XMetaL 5.0 and XMetaL 5.5. Does anybody know that is it a bug in XMetaL 5.5 which caption becomes all lower cases?
Brianwongsk27 April 23, 2010 at 6:23 am
Reply to: Problem with xmetal55.tlb fileApril 23, 2010 at 6:23 am
Just follow up the problem I have above. I have worked out the solution for this problem. I used late binding method to get the Caption property out in C# and the problem resolved.
BrianXMetaLOldTimer May 4, 2010 at 12:14 am
Reply to: Problem with xmetal55.tlb fileMay 4, 2010 at 12:14 am
By late-binding, I guess you are using IDispatch. Sorry for that but this is the only fix for the short-term.
Turns out, our IDL file has occurrences of the same case-insensitive name for both parameters and properties. We would need to alter the XMetaL IDL file to ensure parameter names are distinct from property or method names. Otherwise, the MIDL compiler is going to change the casing in the xmetal55.tlb by-design:
Addamwongsk27 May 11, 2010 at 4:12 am
Reply to: Problem with xmetal55.tlb fileMay 11, 2010 at 4:12 am
Your are right, Addam. I suspect I can only do late binding to solve the problem now as the XMetal55.tlb is not generated by us. Thus, for the time being, until XMetal55.tlb get fixes, I will need to use this method to by pass this problem.
- You must be logged in to reply to this topic.