IDL to Type Library

送分小仙女□ 提交于 2019-12-07 22:58:36

问题


Is there a way in Delphi 7 to generate a tlb from an idl? Or even from a class/ interface definition?


回答1:


you can use the IDL2PAS.bat batch file (check in this location C:\Program Files\Borland\Delphi7\Bin) or the MIDL.exe application.




回答2:


In Delphi 7 one of the easiest ways is to copy/paste the IDL into the Type Library editor source window. NOT the *_TLB.pas source unit 'behind' the type library, but the type library editor itself.

I don't have D7 to hand right now, but iirc you may have to set the "Type Library Language" option in the IDE settings to IDL rather than Pascal. And I also seem to recall that this technique could be sensitive to "exotic" IDL (i.e. didn't always work), but if the IDL in question is relatively straightforward, this may work for you.



来源:https://stackoverflow.com/questions/5091829/idl-to-type-library

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!