Hi, change declaration of struct to follow:
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
public class IMAGE
{
public UInt32 x;
public UInt32 y;
public IntPtr data;
};
and for IntPtr to string use methods:
public static string[] PtrToStringArray (IntPtr stringArray)
{
if (stringArray == IntPtr.Zero)
return new string[]{};
int argc = CountStrings (stringArray);
return PtrToStringArray (argc, stringArray);
}