I am trying to call a Delphi function from C# ASP.NET code. The function\'s declaration looks like this:
function SomeFunction(const someString, SomeOtherStr
Try
[DLLImport(MyDLL.dll, CallingConvention = CallingConvention.StdCall, CharSet = CharSet.Ansi)] public static extern IntPtr SomeFunction(string someString, string SomeOtherString);
and use Marshal.GetObjectForNativeVariant with the return value to get a .NET object.
Marshal.GetObjectForNativeVariant