The C# function is not corresponding to the Delphi one. How can it be
, ever? Last parameter is not by ref but by value.
public static extern Int32 foo(
Int32 pass1, Int32 pass2,
string txtToConvert, string convText,
I'm not really sure about one of the parameters of the type
. If one of the parameters is meant to be output, probably both signatures are incorrect.
If last parameter should be by reference, it could be
in Delphi (yes, Delphi has a weird feature:
before a parameter means "constant reference", not just constant), and in C# in should be
(it only depends on function implementation semantic and affects the usage by the caller).