.idl到.dll [英] .idl to .dll

查看:139
本文介绍了.idl到.dll的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

I 想 至 创建  A 的.dll 从  A 的.idl(接口 描述 语言) 在 顺序 至 进口 所述 的.dll 入 我的  WinForm的 项目  I 知道  I 应该 编译 的 的.idl 到  .TLB 文件 第一,(是 还有 另一个 方法 ) 和  I 可以 使用 的  MIDL 工具 以 视觉 工作室 到 做好 它,但 我  MIDL 返回  A 错误  MIDL2025 ,


就像 那个:


。\ hi.idl(12):错误MIDL2025:语法错误:期待一个声明者或*靠近
"<"

。\ hi.idl(12):错误MIDL2025:语法错误:期待;或者,靠近"<"

。\\\\.IDl(12):错误MIDL2026:无法从早期的语法错误中恢复;中止
$ B $复制汇编


和&NBSP;我&NBSP;的.idl&NBSP;文件&NBSP;在&NBSP;线&NBSP; 25&NBSP;是&NBSP;如&NBSP;下面:


typedef sequence< string> unshortArray;


据&NBSP;似乎&NBSP;也就是说&NBSP;的&NBSP;错误 具有&NBSP;不&NBSP;联想&NBSP;与&NBSP;的&NBSP;代码,一些&NBSP;博客&NBSP;说&NBSP;也就是说&NBSP; I&NBSP;应该&NBSP;使用&NBSP; A&NBSP ;高&NBSP;版本&NBSP;的&NBSP; MIDL和&NBSP; I&NBSP;具有&NBSP;更新&NBSP;我&NBSP; VS,但&NBSP; I&NBSP;不&NBSP;知道&NBSP;如何&NBSP;到&NBSP;发现&NBSP;其中&NBSP;版本&NBSP;应该&NBSP; I&NBSP;使用&NBSP;为&NBSP;我&NBSP ;的.idl&NBSP;和&NBSP;如何&NBSP;到&NBSP;获得&NBSP;它


&NBSP;是&NBSP;还有&NBSP;人&NBSP;曾经&NBSP;符合&NBSP; A&NBSP;类似的&NBSP;问题&NBSP;或&NBSP;具有&NBSP;任何&NBSP;线索&NBSP;约&NBSP;它&NBSP;谢谢&NBSP;你




解决方案
< blockquote> .idl用于COM,所以我假设你在C ++中这样做。这个论坛是C#论坛,所以我将你的问题转移到C ++论坛。


I want to create a .dll from a .idl(Interface Description Language) ,in order to import the .dll into my winform project. I know I should compile the .idl to .tlb file first,(is there another method? ) and I can use the midl tool in Visual Studio to do it,but my midl returns a error MIDL2025 ,

like that:

.\hi.idl(12) : error MIDL2025 : syntax error : expecting a declarator or * near
"<"
.\hi.idl(12) : error MIDL2025 : syntax error : expecting ; or , near "<"
.\hi.idl(12) : error MIDL2026 : cannot recover from earlier syntax errors; abort
ing compilation

and my .idl file in line 25 is as below:

typedef sequence <string> unshortArray;

It seems that the error has no associate with the code,some blogs say that I should use a higher version of MIDL,and I have updated My VS,but I don't know how to find which version should I use for my .idl and how to get it.

 Is there anybody ever meet a similar problem ,or have any clue about it? Thank you.


解决方案

.idl is for COM so I assume you are doing this in C++. This forum is the C# forums so I'm moving your question to the C++ forums.


这篇关于.idl到.dll的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆