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

后端 未结 9 1632
孤城傲影
孤城傲影 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

    I found a post from Robert Giesecke on the Delphi Prism newsgroups. In it, he announces a project you can add to a solution that lets you export arbitrary functions from a .Net DLL simply by adding the DllExport attribute to them. It supports marshaling just like DllImport. He demonstrates it with a Prism project, but I imagine it would work on C# classes as well. The post was made in March, so I'm not sure whether the attachment will still be available. The May release of Prism obviates such a tool since it supports unmanaged exports by itself.

提交回复
热议问题