Pages: 1
Print
Author Topic: Problem with xmetal55.tlb file  (Read 1556 times)
Brian Wong
Member

Posts: 18


« on: April 22, 2010, 01:11:06 AM »

Hi everyone,

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?

Regards,

Brian
Logged
Brian Wong
Member

Posts: 18


« Reply #1 on: April 23, 2010, 12:23:03 AM »

hi all,

        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.

Regards,

Brian
« Last Edit: April 23, 2010, 12:28:40 AM by Brian Wong » Logged
XMetaLOldTimer
Global Moderator
Member

Posts: 19


« Reply #2 on: May 03, 2010, 06:14:20 PM »

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:

http://support.microsoft.com/kb/220137

Regards,
Addam
« Last Edit: May 04, 2010, 06:17:39 PM by XMetaLOldTimer » Logged

Addam Smith, XMetaL Project Lead & Architect
JustSystems Canada Inc.
Brian Wong
Member

Posts: 18


« Reply #3 on: May 10, 2010, 10:12:03 PM »

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.



-Brian
Logged
Pages: 1
Print
Jump to:  

email us