IDL 到类型库
Delphi 7中有没有办法从idl生成tlb?或者甚至来自类/接口定义?
Is there a way in Delphi 7 to generate a tlb from an idl? Or even from a class/ interface definition?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以使用
IDL2PAS.bat
批处理文件(检查此位置 C:\Program Files\Borland\Delphi7\Bin)或MIDL.exe
应用程序。you can use the
IDL2PAS.bat
batch file (check in this location C:\Program Files\Borland\Delphi7\Bin) or theMIDL.exe
application.在 Delphi 7 中,最简单的方法之一是将 IDL 复制/粘贴到类型库编辑器源窗口中。不是类型库“后面”的 *_TLB.pas 源单元,而是类型库编辑器本身。
我现在没有 D7,但是 iirc 您可能必须将 IDE 设置中的“类型库语言”选项设置为 IDL 而不是 Pascal。我似乎还记得这种技术可能对“外来”IDL 敏感(即并不总是有效),但如果所讨论的 IDL 相对简单,这可能对您有用。
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.