[Mono-list] Mono can't use LayoutKind.Explicit ?
infodate
infodate@aster.pl
Sat, 24 Jul 2004 21:34:41 +0200
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: mono-list-admin@lists.ximian.com
[mailto:mono-list-admin@lists.ximian.com] On Behalf Of Sirajuddin Maizir
Sent: Saturday, July 24, 2004 11:47 AM
To: mono-list@lists.ximian.com
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 - Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list