comp.lang.ada
 help / color / mirror / Atom feed
From: dkristol@pollock.artists (David Kristola)
Subject: Re: Calling Ada proceedures from a C program
Date: 1999/06/10
Date: 1999-06-10T00:00:00+00:00	[thread overview]
Message-ID: <7jne6d$5p55@svlss.lmms.lmco.com> (raw)
In-Reply-To: 7jlsqd$khj$1@nnrp1.deja.com

In article 1@nnrp1.deja.com, rekennedy@my-deja.com () writes:
>I'm having trouble getting the same thing to work for strings. For the
>strings, I ended up using the "char_ptr" type from Interfaces.C.Strings.
>On the c-side, the values are char *, on the Ada-side, they are
>char_ptr.  The C calls the Ada procedure without a problem, until the
>code starts to return to the C, passing the value back.  At that point,
>it raises an access violation.  Still not sure what I'll have to do to
>get this working. If anyone has done this, I'd really appreciate any
>advice on it.
>
>I'll list the specs, headers, etc of the files here as an example of
>one way of doing this. Hopefully it will keep someone else from having
>the same frustrations looking for examples.
>
>
>Robert Kennedy
>Science Applications International Corporation (SAIC)

You did not include the body for My_Test_Package, so i am not
sure what it is doing, but the problem may be in the way out
parameters are handled.  As with the integer case, Ada may
use a pointer to the string pointer.  I am sure this is in the
documentation somewhere, but i do not have it close at hand.


--djk, keeper of arcane lore & trivial fluff
Home: David95037 at aol dot com
Spam: goto.hades@welovespam.com





  parent reply	other threads:[~1999-06-10  0:00 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-05-20  0:00 Calling Ada proceedures from a C program Jason LaPenta
1999-05-20  0:00 ` Gautier
1999-05-20  0:00 ` Compilier Im' using Jason LaPenta
1999-05-21  0:00   ` Robert Dewar
1999-05-20  0:00 ` Calling Ada proceedures from a C program David C. Hoos, Sr.
1999-05-20  0:00   ` Geert Bosch
1999-05-21  0:00     ` Keith Thompson
1999-06-09  0:00 ` rekennedy
1999-06-09  0:00   ` Robert Dewar
1999-06-10  0:00   ` David Kristola [this message]
1999-06-11  0:00   ` David C. Hoos, Sr.
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox