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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,2f8d8a3114645e6c X-Google-Attributes: gid103376,public From: john@assen.demon.co.uk.nospam (John McCabe) Subject: Re: Calling C function in Ada Date: 2000/10/09 Message-ID: <39e255b3.20834416@news.demon.co.uk>#1/1 X-Deja-AN: 679520338 X-NNTP-Posting-Host: assen.demon.co.uk:158.152.218.101 References: <8qgon0$469$1@nnrp1.deja.com> X-Trace: news.demon.co.uk 971134602 nnrp-12:1212 NO-IDENT assen.demon.co.uk:158.152.218.101 Newsgroups: comp.lang.ada X-Complaints-To: abuse@demon.net Date: 2000-10-09T00:00:00+00:00 List-Id: ebresie@usa.net wrote: > I am currently working on trying to have access to some of the protocol >and service functions which are part of C and I think I am having some >problems. I am still very new to using C functions in Ada..so it may >just be a usage issue. > >How is the best way to handle the passing in of the char * type variabls >and the char ** type variables? Use Interfaces.C.Strings.chars_ptr and its associated operations for char * stuff. You mention To_Ada, but you need to use function Value to return a string, and function New_String to return a chars_ptr from a string. As for char **, I used an instantiation of Interfaces.C.Pointers. Hope this helps. Best Regards John McCabe