[Gtk-sharp-list] Strange Tree Model behavior (Multi-Threading)

Jonathan Pryor jonpryor at vt.edu
Fri Jun 15 06:46:29 EDT 2007


On Thu, 2007-06-14 at 09:23 -0500, Michael Fasolino wrote:
> ....  In my code one of the first things that I did on the newly
> spawned thread was to make some calls into the unmanaged environment.
> The parameter lists of one of my dllExport/dllImport pairs were not
> matching.  For some reason the compiler did not catch this

The compiler CANNOT catch this.  There are two different compilers in
use, the C compiler and the C# compiler, and they don't talk to each
other. :-)

You can work around this issue somewhat.  Mono.Unix "solves" this
problem by using the create-native-map program (in the mono-tools svn
module), which reads the C# .dll file and generates a C header file for
all structs and [DllImport]-attributed methods to ensure some level of
consistency between what the C# code is calling and what the C code is
implementing.  However, this does require some extra effort.

 - Jon




More information about the Gtk-sharp-list mailing list