Kees Bleijenberg | 15 Nov 09:39 2013
Picon

how to call a callback in a haskell dll

My program creates a Windows dll. The calling program calls a function with strings as parameters. Works fine.

I want to add a extra parameter. This extra parameter is a callback:  a function Int -> Int: stdcall. In Haskell I want to call this function.  So I have to convert the pointer to a (formal) Haskell function.

In the examples for the FFI, Haskell provides the callback. I need an example or documentation.

 

Kees

 

 

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe <at> haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Gmane