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-Thread: 103376,b52de9e030c4b536 X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!out01a.usenetserver.com!news.usenetserver.com!in04.usenetserver.com!news.usenetserver.com!in03.usenetserver.com!news.usenetserver.com!wns14feed!worldnet.att.net!164.128.36.58!news.ip-plus.net!newsfeed.ip-plus.net!news.post.ch!not-for-mail From: Martin Krischik Newsgroups: comp.lang.ada Subject: Re: Q re how to do pointer access in Ada (newbie) Date: Mon, 26 Nov 2007 10:17:27 +0100 Organization: Swisscom IP+ (post doesn't reflect views of Swisscom) Message-ID: <474a8f50$1@news.post.ch> References: <3b81f333-a350-40f5-91b1-ea45ad58cd6f@i29g2000prf.googlegroups.com> NNTP-Posting-Host: 194.41.146.1 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: atlas.ip-plus.net 1196068691 8269 194.41.146.1 (26 Nov 2007 09:18:11 GMT) X-Complaints-To: abuse@ip-plus.net NNTP-Posting-Date: Mon, 26 Nov 2007 09:18:11 +0000 (UTC) User-Agent: Thunderbird 2.0.0.9 (Windows/20071031) In-Reply-To: <3b81f333-a350-40f5-91b1-ea45ad58cd6f@i29g2000prf.googlegroups.com> X-Original-NNTP-Posting-Host: w01iwt.pnet.ch X-Original-Trace: 26 Nov 2007 10:18:08 +0200, w01iwt.pnet.ch Xref: g2news1.google.com comp.lang.ada:18623 Date: 2007-11-26T10:17:27+01:00 List-Id: 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