创建可以使用stdcall在Delphi应用程序中导入的C#DLL - 可能? [英] Create a C# DLL That Can Be Imported in a Delphi App Using stdcall - Possible?
问题描述
是否可以创建符合该接口的C#DLL,可以在Delphi应用程序中使用?
有没有一些示例代码演示如何将C#DLL编码为stdcall接口方法?
这是不可能在纯C#,但这是一篇文章,它展示了如何将非托管导出表添加到C#库中,然后可以使用任何其他语言。请注意,提到闪电战的人不应该把你放弃 - 它们与作者自己的上下文有关,与基本概念及其运作方式无关。
Brian Long的一次会议还有一节纸。在一个扭曲中,你可以看到有点讽刺意味,Delphi.Net实际上支持非托管出口,尽管C#没有这样做。我不知道Delphi棱镜是否也是这样。
I have a program that I need to create a DLL for, hopefully in C#. The program is written in Delphi and I have an interface file to code to. The interface uses the stdcall calling convention.
Is it possible to create a C# DLL that conforms to the interface and can be used in the Delphi application?
Is there some sample code that demonstrates how to code the C# DLL to a stdcall interface method?
This is not possible in pure C#, but this is an article that shows how to add an unmanaged export table to your C# library, which can then be used in any other language. Note that the hordes of references to Blitz should not put you off - they relate to the author's own context and have nothing to do with the basic concept and how it works.
There is also a section in Brian Long's one conference paper. In a twist that you could see as somewhat ironic, Delphi.Net actually supported unmanaged exports directly despite C# not doing so. I have no idea if this is true of Delphi Prism as well.
这篇关于创建可以使用stdcall在Delphi应用程序中导入的C#DLL - 可能?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!