[Mono-list] P/Invoke for function pointers using C#

Nigel Benns nigel_benns at rogers.com
Thu May 19 10:23:40 EDT 2005


What you have to do is create a delegate to simulate the type of function
you will be using.

take a look here:

http://svn.myrealbox.com/viewcvs/trunk/efl-sharp/libs/efl-sharp/src/lib/ewl_window.cs?rev=44726&view=auto

It uses a delete event handler for a window.
The delegate is the function in C where IntPtr in C# = void* in C.

Its nice cause I set it up to add the event.

Any more questions just email me directly

> Hi,
> Can you give me a sample code for making P/Invoke calls to C code,
> from C# mono code, where the C calls takes a function pointer?
>
> Is this supported on mono?
> Thanks & Regards
> Kala B.
> _______________________________________________
> Mono-list maillist  -  Mono-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
>



More information about the Mono-list mailing list