
5 Feb
2007
5 Feb
'07
8:40 p.m.
Hi Stefan,
In that case, how do I marshall [String] to Ptr (Ptr CChar)?
Thanks
-John
On 2/6/07, Stefan O'Rear
You have to use a type that C's tiny brain understains. IANAWP but I'm guessing you want:
type ServiceMainClosure = DWORD -> Ptr (Ptr CChar) -> IO ()
foreign import ccall "wrapper" mkServiceMainClosure :: ServiceMainClosure -> IO (FunPtr ServiceMainClosure)