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 RAA21360; Fri, 12 Oct 2001 17:08:24 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id RAA21207 for ; Fri, 12 Oct 2001 17:08:23 +0200 (MET DST) Received: from amber.zine.cz ([195.144.118.158]) by nez-perce.inria.fr (8.11.1/8.10.0) with ESMTP id f9CF8ID23104 for ; Fri, 12 Oct 2001 17:08:19 +0200 (MET DST) Received: from Spooler by amber.zine.cz (Mercury/32 v3.21c) ID MO0009F4; 12 Oct 01 17:02:25 +0200 Received: from spooler by amber.zine.cz (Mercury/32 v3.21c); 12 Oct 01 17:02:10 +0200 Received: from CZXXPRA01WK0038 (62.189.240.20) by amber.zine.cz (Mercury/32 v3.21c) with ESMTP ID MG0009F3; 12 Oct 01 17:02:09 +0200 From: "Jenda Krynicky" To: caml-list@inria.fr Date: Fri, 12 Oct 2001 17:06:12 +0200 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Subject: Re: [Caml-list] DLLs or COM (was: ISAPI filter) Message-ID: <3BC72304.5217.47E16C5@localhost> In-reply-to: <20011012162732.E18676@pauillac.inria.fr> References: <3BC6DCE3.28395.36C265A@localhost>; from Jenda@Krynicky.cz on Fri, Oct 12, 2001 at 12:06:59PM +0200 X-mailer: Pegasus Mail for Win32 (v3.12c) Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk From: Xavier Leroy > > 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. Fine, thanks :-) If I get anywhere I'll share the results. > > 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. COM+ services are able to pre-create a "pool" of objects and then when an ASP page or whatever asks for an instance it is given one of the already existing objects, then as the page stops using the object it's returned to the pool and reused. It should speed things up. Especialy since in the ASP pages you usualy only use the object once or twice. Sorry I don't remember exactly what is needed (I believe the object has tu support a certain COM interface plus maybe something else), but I know for sure you can't create poolable objects with Visual Basic. Jenda =========== Jenda@Krynicky.cz == http://Jenda.Krynicky.cz ========== There is a reason for living. There must be. I've seen it somewhere. It's just that in the mess on my table ... and in my brain. I can't find it. --- me ------------------- 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