[Mono-list] (no subject)

David Abrames abramesd at kmbs.konicaminolta.us
Mon Aug 7 11:10:58 EDT 2006


Hello, 

I have the following structure in Windows: 

typedef struct { 
BYTE FAR *myBtyeArray; 
} MYSTRUCTURE; 

In .NET this structure is defined like this: 

[StructLayout(LayoutKind.Sequential, Size = 4, Pack = 1)] 
public class MYSTRUCTURE { 
public byte[] myByteArray; 
} 

which works OK. I then compiled the code successfully on Mono 1.1.16.1 but
when I run my program I get the following error: 

** ERROR ** Structure field of type byte[] can't be marshaled as LPArray.
I have read several postings and articles about marshaling but I do not
understand what the underlying problem is.  This structure is used in a
function call where the called function will return a pointer to an array of
bytes. How should this be marshaled?

Regards 
David 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: winmail.dat
Type: application/ms-tnef
Size: 1984 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-list/attachments/20060807/8bcac5e3/attachment.bin 


More information about the Mono-list mailing list