Calling a Delphi method in a dll from c#

后端 未结 2 1606
一生所求
一生所求 2021-01-13 04:57

I am trying to call a method in a Delphi DLL with the following signature:

 function SMap4Ovr(const OverFileName       : ShortString    ;
                            


        
2条回答
  •  孤街浪徒
    2021-01-13 05:50

    Default calling convention in Delphi is register, not stdcall. It seems calling conventions details show us that Microsoft fastcall is not the same as Borland fastcall (register)

    And C# string type differs from Delphi ShortString (it contains internally one byte length + string body)

提交回复
热议问题