English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
[Caml-list] Callback in DLL
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2001-12-26 (18:45)
From: Warp <warplayer@f...>
Subject: [Caml-list] Callback in DLL
I got some problems passing a callback function value to a DLL, which will
call the caml function when some event occurs.
In fact, to use the callback_exn C API function, I have to link with the
libcamlrun library, but that's not why I want to do because an interpreter
 ocamlrun ) is already running.

Here's a proposal to resolve such a problem :
a DLL should have an EntryPoint ( called CamlEntryPoint for exemple ) and
when it's first load by the run-time system, it call the DLL EntryPoint
function, passing both cprims and names_of_cprims arrays as parameters. Then
we only have to add a "caml" callback func (useless in caml !) to enable DLL

I don't know how LabTk works... I'll have a look at it.


Bug reports: http://caml.inria.fr/bin/caml-bugs  FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr  Archives: http://caml.inria.fr