转换接口IDL文件到C# [英] Convert Interface IDL file to C#

查看:322
本文介绍了转换接口IDL文件到C#的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在,我想在C#中使用IDL文件中定义的接口。有没有办法到IDL转换为可使用的东西在C#?

I have an interface defined in an IDL file that I would like to use in C#. Is there a way to convert the IDL to something usable in C#?

推荐答案

一种方法是运行 MIDL 的IDL创建一个类型库(.tlb)。这需要一个库中的IDL 块。一旦你的.TLB,您可以运行 tlbimp.exe是就可以得到一个C#定义/互操作DLL。

One way is to run MIDL on the IDL to create a type library (.tlb). This requires a library block in the IDL. Once you have the .tlb, you can run tlbimp.exe on it to get a C# definition/Interop DLL.

这篇关于转换接口IDL文件到C#的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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