M
Maxim Kazitov
Hi,
I try to invoke function with following prototype from external DLL :
LONG Fun1(LONG n, LPCSTR* lpNames, LPLONG lpStatus);
n - number of element in Names;
lpNames - is in/out string array (function can modify array);
lpStatus - is in/out long array (function can modify array);
But I can't create appropriated function declaration in C# . I try :
Int32 Fun1(Int32 n, String[] names, Int32[] status)
Int32 Fun1(Int32 n, ref string[] names, ref int[] status);
Int32 Fun1([MarshalAs(UnmanagedType.LPArray)] String[] names, ref IntPtr
status);
But nothing works properly.
Should I use "fixed" statement ?
Thanks,
Max
I try to invoke function with following prototype from external DLL :
LONG Fun1(LONG n, LPCSTR* lpNames, LPLONG lpStatus);
n - number of element in Names;
lpNames - is in/out string array (function can modify array);
lpStatus - is in/out long array (function can modify array);
But I can't create appropriated function declaration in C# . I try :
Int32 Fun1(Int32 n, String[] names, Int32[] status)
Int32 Fun1(Int32 n, ref string[] names, ref int[] status);
Int32 Fun1([MarshalAs(UnmanagedType.LPArray)] String[] names, ref IntPtr
status);
But nothing works properly.
Should I use "fixed" statement ?
Thanks,
Max