From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id QAA18529; Fri, 12 Oct 2001 16:27:40 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id QAA19454 for ; Fri, 12 Oct 2001 16:27:39 +0200 (MET DST) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.11.1/8.10.0) with ESMTP id f9CERXj29234; Fri, 12 Oct 2001 16:27:33 +0200 (MET DST) Received: (from xleroy@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id QAA19452; Fri, 12 Oct 2001 16:27:32 +0200 (MET DST) Date: Fri, 12 Oct 2001 16:27:32 +0200 From: Xavier Leroy To: Jenda Krynicky Cc: caml-list@inria.fr Subject: Re: [Caml-list] DLLs or COM (was: ISAPI filter) Message-ID: <20011012162732.E18676@pauillac.inria.fr> References: <3BC1F99E.25519.F29B64@localhost> <3BC6DCE3.28395.36C265A@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: <3BC6DCE3.28395.36C265A@localhost>; from Jenda@Krynicky.cz on Fri, Oct 12, 2001 at 12:06:59PM +0200 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk > 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