[Mono-list] interop help....

Lloyd Dupont lloyd@galador.net
Sun, 04 Nov 2001 01:56:44 +0100


i am trying to calling a C# callback from C.

the C signature is
int (*read)(void * someData, int length, void * buf);

in C# i have a delegate method whose signature is:
int read(
	IntPtr ctxt,
	int len,
	[MarshalAs(UnmanagedType.LPArray, SizeParamIndex=1)] byte[] ptr)

according to the documentation this should be ok and the ptr.Length 
should be len (2nd arg)

Alas, ptr.Length is always 1 (i have done System.Console.WriteLine...)
any idea, clues, advice, ???
please...

and thanks for your attention.
Lloyd