Good day!
I have strange problem. On Delphi side we have:
Function Func(str: String; res: double) : double; export; stdcall;
Begin
Result := res;
End;
And on C# side:
[DllImport("Project1.dll")]
static extern double Func(string str, double res);
It's OK, if i will write like this:
Console.WriteLine(Func("this is my function", 0.1));
Result will be 0.1.
But if I will replace 0.1 with 0 (zero, and 0d, and 0.0 too), I will get SEHException (0x80004005).
Any ideas?
UPD.
Delphi 2007 (no way to change, too many to rebuild ^_^)
VS 2013 (.NET 4.5.1)
OS: Windows 8.1
Platform target x86 (in x64 it does not work at all).