Perhaps I'm missing something obvious, but I'm merely trying to pass an array from a FTN95 routine (in a DLL) to a C# static routine (in another DLL) and the following test code causes a runtime error:
[u]FTN95[/u] SUBROUTINE SUB1 LIBRARY 'CSlib.dll' ! C# DLL ASSEMBLY_EXTERNAL(NAME='CSlib.TestClass.test') TEST INTEGER IRET,ITEST(2)
IRET = TEST(ITEST)
END SUBROUTINE
[u]C#[/u] public class TestClass { public static int test(ref int[] itest) { itest[0] = 1; itest[1] = 2; return(0); } }
I'm using .NET in Visual Studio 2003. At runtime the debugger raises the error: 'Method not found: Int32 CSlib.TestClass.test(Int32 ByRef)'. Works fine if I pass a scalar (i.e. 'INTEGER ITEST' and 'ref int itest'), but not an array.
Am I using the correct syntax for FTN95/C# for passing an array by reference? Any suggestions?
Thanks in advance,
Andy.