comp.lang.ada
 help / color / mirror / Atom feed
From: Martin Krischik <krischik@users.sourceforge.net>
Subject: Re: Q re how to do pointer access in Ada (newbie)
Date: Mon, 26 Nov 2007 10:17:27 +0100
Date: 2007-11-26T10:17:27+01:00	[thread overview]
Message-ID: <474a8f50$1@news.post.ch> (raw)
In-Reply-To: <3b81f333-a350-40f5-91b1-ea45ad58cd6f@i29g2000prf.googlegroups.com>

axtens schrieb:
> G'day everyone!
> 
> In my current DLL project, I'm passing from VB6 to the Ada DLL a
> variety of addresses: VARPTRs to LONG, to DOUBLE, to a TYPE which is
> two LONGs, and a TYPE which is two DOUBLEs. Assuming these arrive in
> to an Ada function with a parameter defined as Win32.LONG, what would
> be the best way of converting that LONG to something which can be used
> to extract the data to which it points?

You are aware that passing pointer as Win32.LONG might not work on
Windows 64?

Now, I would not pass the parameter as a "pointer" at all. I would use
"in", "out", "in out" and maybe "access" whatever is appropiate.

Suggested Reading:

http://en.wikibooks.org/wiki/Ada_Programming/Types/access#C_compatible_pointer

Martin
-- 
mailto://krischik@users.sourceforge.net
Ada programming at: http://ada.krischik.com



      reply	other threads:[~2007-11-26  9:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-26  8:35 Q re how to do pointer access in Ada (newbie) axtens
2007-11-26  9:17 ` Martin Krischik [this message]
replies disabled

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