i'm having problems calling a delphi function from C# (attempted to read or write protected memory), and was wondering what the correct way of calling the method should be. The Delphi function signature is as follows:
procedure methodToCall(
aFirstParameter: Widestring;
var aSecondParameter: Widestring
); stdcall;
What is the correct way of calling this method from C#?