[Mono-list] PInvoke Conventions

Bob Smith bob@thestuff.net
27 Jul 2001 15:21:39 -0600


I ran into this site while looking for more information. It might be
usefull. Have a look.

http://msdn.microsoft.com/msdnmag/nettop.asp?page=/msdnmag/issues/01/05/com/com0105.asp&ad=ads.ddj.com/msdnmag/ros.htm

On 27 Jul 2001 15:00:29 -0600, Bob Smith wrote:
> can offsetof be used at runtime? if so, we might be able to use metadata
> and offsetof & sizeof to do all of the struct stuff on the fly.
> 
> On 27 Jul 2001 15:52:00 -0400, Miguel de Icaza wrote:
> > 
> > > One way to do this would be to write C programs that generate the C# files.
> > > The C programs can include all the appropriate header files,
> > > 
> > > 	  #include <foo.h>
> > > 
> > > and can then output the values of the constants directly:
> > > 
> > > 	  printf("const int FOO = %d\n", FOO);
> > > 
> > > For structs and other types, the C program can use sizeof() and offsetof()
> > > to ascertain the representation and/or layout, and can then output C# code
> > > accordingly.
> > 
> > This sounds exactly what we want to do.
> > 
> > > If this becomes cumbersome, and you want to get fancy, you can write a program
> > > to generate the C programs that generate the C# files ;-)
> > 
> > HAHAHA.
> > 
> > _______________________________________________
> > Mono-list maillist  -  Mono-list@ximian.com
> > http://lists.ximian.com/mailman/listinfo/mono-list
> > 
> 
> 
> 
> _______________________________________________
> Mono-list maillist  -  Mono-list@ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
>