General XMetaL Discussion

XMetaL Community Forum General XMetaL Discussion Problem with xmetal55.tlb file

  • wongsk27

    Problem with xmetal55.tlb file

    Participants 2
    Replies 3
    Last Activity 12 years, 5 months ago

    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

    Reply

    wongsk27

    Reply to: Problem with xmetal55.tlb file

    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

    Reply

    XMetaLOldTimer

    Reply to: Problem with xmetal55.tlb file

    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:

    [url=http://support.microsoft.com/kb/220137]http://support.microsoft.com/kb/220137[/url]

    Regards,
    Addam

    Reply

    wongsk27

    Reply to: Problem with xmetal55.tlb file

    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

    Reply

  • You must be logged in to reply to this topic.

Lost Your Password?

Products
Downloads
Support