如何为我的DLL创建托管头文件 [英] How to create a managed header file for my DLL

查看:101
本文介绍了如何为我的DLL创建托管头文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我有一个使用C#(.Net 4.0)开发的桌面应用程序.我需要创建一个将由两个应用程序使用的DLL,
1)使用C#(.Net 4.0)开发的应用程序
2)使用VC6.0开发的应用程序

这个怎么做.我听说将DLL头文件转换/导入到托管头文件中可以解决此问题.如何将我的DLL头文件转换/导入到托管头文件中?

问候,
Sankar.

Hi,
I have a desktop application developed using C# (.Net 4.0). I need to create a DLL which will be used by two applications,
1) Application developed using C# (.Net 4.0)
2) Application developed using VC6.0

How to do this. I heard converting/importing my DLL header file into a managed header file would solve this. How to convert/import my DLL header file into a managed header file?

Regards,
Sankar.

推荐答案

如果您想同时在.net和VB6中使用dll,则必须开发COM可见的.net dll.
在C#中构建COM对象 [ http://www.geeksengine.com/article/create-dll.html [ ^ ]
这是完整的指南,您只需在Google上搜索"com interop .net vb6",就会发现更多结果
http://support.microsoft.com/kb/817248 [
wel if you want to use dll in both .net and VB6 then you have to develop COM visible .net dll.
Building COM Objects in C#[^]
http://www.geeksengine.com/article/create-dll.html[^]
and here are complete guidelines and you can simply google "com interop .net vb6" and you will find a lot more results
http://support.microsoft.com/kb/817248[^]


这篇关于如何为我的DLL创建托管头文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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