From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,d71460587da14d5b X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-07-30 16:14:38 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!transit.news.xs4all.nl!rhinewceros.xs4all.nl!not-for-mail Newsgroups: comp.lang.ada Subject: Re: Importing C structs? From: Ching Bon Lam References: Organization: Universiteit Twente Message-ID: User-Agent: Xnews/5.04.25 Date: 30 Jul 2003 23:14:37 GMT NNTP-Posting-Host: 213.84.97.6 X-Trace: 1059606877 dreader9.news.xs4all.nl 76268 213.84.97.6:24257 Xref: archiver1.google.com comp.lang.ada:41048 Date: 2003-07-30T23:14:37+00:00 List-Id: Freejack wrote in news:pan.2003.07.30.20.09.17.183172.1022@nospam.net: > I'm finally starting to get an idea(at least I think I am.) on handling > interfacing to C. just a process of trial&error.. very time consuming. > > However, I'm fuzzy on importing C structs. In a nutshell...here is the > function I'm attempting to import... > > DB * > dbopen(const char *file, int flags, int mode, DBTYPE type, > const void *openinfo); that would be: type DB is interfaces.c.extensions.opaque_structure_def; -- i have too less information about DBTYPE, so i assume -- it's just a struct type DBTYPE is interfaces.c.extensions.opaque_structure_def; function dbopen (file : interfaces.c.char_array; flags : interfaces.c.int; mode : interfaces.c.int; type : DBTYPE; openinfo : interfaces.c.extensions.void_ptr) return DB; pragma Import(C, dbopen, "dbopen'); hope this works.. CBL