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 MAA05853; Wed, 10 Sep 2003 12:26:09 +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 MAA12794 for ; Wed, 10 Sep 2003 12:26:08 +0200 (MET DST) Received: from mail.libertysurf.net (mail.libertysurf.net [213.36.80.91]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id h8AAQ7f20268 for ; Wed, 10 Sep 2003 12:26:07 +0200 (MET DST) Received: from tiscali.fr (192.168.10.37) by mail.libertysurf.net (6.5.034) id 3F51730F0064DC5F for caml-list@inria.fr; Wed, 10 Sep 2003 12:26:07 +0200 Date: Wed, 10 Sep 2003 12:26:07 +0200 Message-Id: Subject: [Caml-list] =?iso-8859-1?Q?Interfacing_C_with_Objective_Caml?= MIME-Version: 1.0 X-Sensitivity: 3 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable From: "=?iso-8859-1?Q?matthieu.dubuget@libertysurf.fr?=" To: "=?iso-8859-1?Q?caml-list?=" X-XaM3-API-Version: 3.2 R30 (B58 pl3) X-type: 0 X-SenderIP: 80.13.152.103 X-Loop: caml-list@inria.fr X-Spam: no; 0.00; interfacing:01 matthieu:01 dubuget:01 matthieu:01 dubuget:01 camlers:01 val:01 val:01 ocaml's:01 'use':99 'use':99 unregister:01 camouflage:01 tiscali:99 cher:99 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Hello Camlers,=0D=0A=0D=0AI designed a simple OCaml module with a abstrac= t type t and=0D=0Afunctions=0D=0Ato create and manipulate values of that = type.=0D=0A=0D=0Atype t=0D=0Aval create : int -> t=0D=0Aval use : t -> in= t=0D=0A...=0D=0A=0D=0AI now want to turn this module as a C dynamic link = library under=0D=0AWindows.=0D=0A=0D=0AI do not know exactly how I should= manage the ocaml values=0D=0Acreated by=0D=0Aocaml's 'create' function: = passed to C (as pointer/handle),=0D=0Aand returned back=0D=0Ato ocaml whe= n calling 'use' function.=0D=0A=0D=0AI think I should register the values= returned by 'create' in=0D=0Aorder to=0D=0Aavoid them to be garbage coll= ected between 'create' and=0D=0A'use' calls,=0D=0Abut I don't know how to= do this?=0D=0A=0D=0AI should also provide a way to unregister those valu= es?=0D=0A=0D=0AI did not find (or understand ;-) how to achieve this usin= g=0D=0Aa tool=0D=0A(like CamlIDL or camouflage). It's why I'm trying to d= o it=0D=0Aby hand=0D=0Afirst.=0D=0A=0D=0AThanks in advance=0D=0A=0D=0AMat= thieu Dubuget=0D=0A=0A=0A********** L'ADSL A 20 EUR/MOIS********** =0AAve= c Tiscali, l'ADSL est =E0 20 EUR/mois. Vous pourrez chercher longtemps av= ant de trouver moins cher ! =0APour profiter de cette offre exceptionnell= e, cliquez ici : http://register.tiscali.fr/adsl/=0AOffre soumise =E0 con= ditions.=0A ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners