views:

225

answers:

1

I need to be able to pass int value representing fd (pipe fd) to gtk function as a first parameter

gint gdk_input_add gint source,
         GdkInputCondition condition,
         GdkInputFunction function,
                       gpointer data);

How do I do that, as CreatePipe returns HANDLE which is NOT int?

Thanks

+1  A: 

To convert a HANDLE value to a C file descriptor, call _open_osfhandle.

Rob Kennedy