Hello! It's difficult to say anything without looking at code - please post it or send it.
I have plenty of problems with P/Invoke differences between .NET and Mono (this is the most vague part of ECMA standard as you may know) but never experienced problems with LayoutKind.Explicit StructLayout attribute and I do a lot of cross platform P/Invoke with complex structs/classes. Cheers Jacek -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Sirajuddin Maizir Sent: Saturday, July 24, 2004 11:47 AM To: [EMAIL PROTECTED] Subject: [Mono-list] Mono can't use LayoutKind.Explicit ? Hi, I'm trying to implement a C# wrapper for SDL, cause I can't find any that work with Mono. First, it runs nicely on both .Net Framework and Mono, but then I realized that there is a bug in my code, which prevent me to use the SDL events subsystem. The bugs is because I declare SDL_events as an ordinary struct (with attribut StructLayout[LayoutKind.Sequential]), where it should be actually a union of struct (with attribut StructLayout[LayoutKind.Explicit]). And then it happens. My program no longer work on Mono (it crash after I tried to use the SDL_events struct), both on Windows and Linux. Has this problem discovered by anyone? If it has, could someone help me to make sure my code work on both Mono and .Net Framework ? (P.S. : sorry for not sending my code, I will send it in zip if you want, just mail me) ===== Thinking is good, but thinking a good thing is more important Keep thinking, and think deeply.... But don't waste your time thinking what to think about .... -- Sirajuddin Maizir -- __________________________________ Do you Yahoo!? Yahoo! Mail - 50x more storage than other providers! http://promotions.yahoo.com/new_mail _______________________________________________ Mono-list maillist - [EMAIL PROTECTED] http://lists.ximian.com/mailman/listinfo/mono-list _______________________________________________ Mono-list maillist - [EMAIL PROTECTED] http://lists.ximian.com/mailman/listinfo/mono-list
