Sorry for the personal problems' log. Well, being back to the interesant problems, I'm working on a P/Invoke article for the Linux Gazette, which let the developers extend their code in C and Perl languages ( at this moment ) and expose it to the Mono world ( Mono languages ).
It is very useful, because, for example, it made possible to bind the Gtk+ api to the Mono platform, so, we now have Gtk#, a great help for the future Gtk+ development.
But I'm having some problems with the datatype, cause sometimes the environment tries the float types as int, and it is not so good. Also, I got some problem while trying to work with C pointers. I've read a moment ago, there are apointers in C#, but they are unsafe ( I would really like to avoid use them but ... ).
I hope to finish my article the next monday or tuesday. By the way, here is a example, which shows the way P/Invoke works: we use DllImport attribute ( attributes are a way of asociate data with the data inside the application ), and loading a function from the math library ( libm.so ) :
[DllImport("libc.so")]
static extern double sqrt ( double n );
It is neccesary the use of the extern and static modifiers to the function signature.
