1.Using the following C# dll as an example ....
Code: Select all
public class ManagedClass : ICalculator
{
public int Add(int Number1, int Number2)
{
return Number1 + Number2;
}
}
-----------------------------------------------------------------------------------------------
2. A call to the following C# dll works OK
Code: Select all
public class TestClass
{
public static string ConcatString(string left, string right)
{
return left + right;
}
}
Code: Select all
public class TestClass
{
public static string ConcatAndModify(ref string left, ref string right)
{
string str = left + right;
left = "12345678";
right = "87654321";
return str;
}
}
<<EXCEPTION>>
Code: 0xFFFFFFFFC0000005 ( -1073741819 )
Continuable: 0x0000000000000000 ( 0 )
Description: The instruction at 0x
ErrorCode: 0xFFFFFFFFC0000005 ( -1073741819 )
ExceptionType: 0x0000000000000000 ( 0 )
Module: C:\Windows\system32\MSVCR120_CLR0400.dll
Process: C:\Program Files\TS Support\MultiCharts64\MultiCharts64.exe
Thread ID: 0x0000000000000710 ( 1808 )
Time: 27.11.2014 - 14:52:38.731
I have ensured that the values initially sent are only 8 characters in length and I have also tried making the call to ConcatAndModify from Multicharts using 'string' and/or 'lpstr' but it makes no difference and I still receive the error above. Does anyone know why an error is occurring?
Many thanks.