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] ISAPI filter
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2001-10-12 (14:27)
From: Xavier Leroy <xavier.leroy@i...>
Subject: Re: [Caml-list] DLLs or COM (was: ISAPI filter)
> Can you produce an ordinary Windows DLL with OCaml?
> Can you use a function to that you got a pointer and whose C style 
> header you know?
> Can you access C style structures you got a pointer to from 
> somewhere?

Yes, all this can be done with the help of some C stub code.  You need
to compile the Caml code to a C object file (option -output-obj),
then write a bit of C stub code to give a C interface to your Caml
code.  Finally, the C object file generated by Caml can be linked with
the stub code and the Caml runtime system to produce a DLL.  Not
completely trivial, but doable.

> A related question :
> Can you use COM objects with OCaml?
> Can you create COM objects with OCaml?

The CamlIDL tool (http://caml.inria.fr/camlidl/) lets you create and
use COM components in Caml.  It automates the creation of the C stub
code mentioned earlier, and also comes with handy scripts to help
building the DLL as described above.

> Can those objects be poolable?

I don't know what a "poolable object" is.

- Xavier Leroy
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