如何在C#中为C ++程序创建dll库 [英] How to make dll library in C# for C++ program

查看:52
本文介绍了如何在C#中为C ++程序创建dll库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

该程序是用C ++编写的,使用的是dll库。我想在C#中编写插件

,但内部库应该是一些函数(ActionProc等)。怎么用

来写呢?


(对不起我的英文)


谢谢,

Winthux

解决方案

COM或什么都没有。


艰难。

" winthux" <无线***** @ klub.chip.pl>在消息中写道

news:bv ********** @ absinth.dialog.net.pl ...

该程序是用C ++编写的使用DLL库。我想在C#中编写插件
,但是库里面应该是一些函数(ActionProc等)。
怎么写呢?

(对不起我的英文)

谢谢,
Winthux



<>写道:

COM或什么都没有。

坚韧。



实际上并不完全正确,你可以通过创意

往返。 (或者你可以使用Delphi for .NET)

http://www.blong.com/Conferences/Bor...32AndDotNetInt

erop.htm


另见书Inside Microsoft .NET IL汇编程序作者:Serge Lidin


Rgds Tim Jarvis。


是的,因为修改程序集清单是C#对吗? />

要从程序集中公开方法,您必须对

程序集清单进行一些更改(在类之前找到IL文件的顶部

声明)。将在清单中提及其他程序集

以及一般模块信息:


我相信他说C#而不是MSIL。


" Tim Jarvis" < TJ ***** @ NoSpamForMe.com>在消息中写道

news:ee ************** @ tk2msftngp13.phx.gbl ...

<。>写道:

COM或什么都没有。

坚韧。



实际上并不完全正确,你可以通过创意
往返。 (或者你可以使用Delphi for .NET)

http://www.blong.com/Conferences/Bor...32AndDotNetInt
erop.htm

另见Inside Microsoft .NET IL汇编程序一书;作者:Serge Lidin

Rgds Tim Jarvis。



The program is written in C++ and uses dll library. I want to write plugin
in C#, but inside library should be some functions ( ActionProc, etc.). How
to write it?

(Sorry about my english)

Thanks,
Winthux

解决方案

COM or nothing.

Tough.

"winthux" <wi*****@klub.chip.pl> wrote in message
news:bv**********@absinth.dialog.net.pl...

The program is written in C++ and uses dll library. I want to write plugin
in C#, but inside library should be some functions ( ActionProc, etc.). How to write it?

(Sorry about my english)

Thanks,
Winthux



<.> wrote:

COM or nothing.

Tough.


Actually not quite true, you can achieve this through creative
roundtripping. (or you could use Delphi for .NET)

http://www.blong.com/Conferences/Bor...32AndDotNetInt
erop.htm

Also see the book "Inside Microsoft .NET IL assembler" by Serge Lidin

Rgds Tim Jarvis.


Yes because modifying the assembly manifest is C# right?

To expose methods from an assembly you must make some changes to the
assembly manifest (found at the top of the IL file before the class
declarations). There will be references to other assemblies in the manifest
as well as general module information:

I do belive he said C# and not MSIL.

"Tim Jarvis" <tj*****@NoSpamForMe.com> wrote in message
news:ee**************@tk2msftngp13.phx.gbl...

<.> wrote:

COM or nothing.

Tough.


Actually not quite true, you can achieve this through creative
roundtripping. (or you could use Delphi for .NET)

http://www.blong.com/Conferences/Bor...32AndDotNetInt
erop.htm

Also see the book "Inside Microsoft .NET IL assembler" by Serge Lidin

Rgds Tim Jarvis.



这篇关于如何在C#中为C ++程序创建dll库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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