Create a C# DLL That Can Be Imported in a Delphi App Using stdcall - Possible?

后端 未结 9 1640
孤城傲影
孤城傲影 2020-12-09 19:35

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

9条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-09 20:15

    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.

提交回复
热议问题