On 03/25/08 Jestin Stoffel wrote:
> I am trying to write mono bindings to libgps, but I'm running into a
> problem. In libgps, there is a function to setup a callback that is
> defined to take a pointer to a pthread, in addition to the usual
> function pointer. To delete the callback, the pointer to the pthread is
> also required. How do I create a pthread in mono so that I can send
> this pointer to the library function?
The pointer is the one you got with gps_set_callback, so you can just
ignore the fact that it is a pthread_t pointer and all this thread that
went ballistic on that:
[DllImport("gps")]
static extern int gps_set_callback (IntPtr gps_data, GpsCallback cb,
out IntPtr handler);
...
IntPtr handler;
IntPtr gps = gps_open ("localhost", "2947");
gps_set_callback (gps, mycb, out handler);
...
lupus
--
-----------------------------------------------------------------
[EMAIL PROTECTED] debian/rules
[EMAIL PROTECTED] Monkeys do it better
_______________________________________________
Mono-list maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-list