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=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,6b4015030847e90a X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!postnews.google.com!i3g2000cwc.googlegroups.com!not-for-mail From: jca.miranda@gmail.com Newsgroups: comp.lang.ada Subject: Re: PSTR to Ada String. Date: 26 Oct 2006 02:18:02 -0700 Organization: http://groups.google.com Message-ID: <1161854282.309813.291100@i3g2000cwc.googlegroups.com> References: <1161809413.511008.220720@h48g2000cwc.googlegroups.com> NNTP-Posting-Host: 153.98.68.197 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1161854287 3673 127.0.0.1 (26 Oct 2006 09:18:07 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 26 Oct 2006 09:18:07 +0000 (UTC) In-Reply-To: <1161809413.511008.220720@h48g2000cwc.googlegroups.com> User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1),gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: i3g2000cwc.googlegroups.com; posting-host=153.98.68.197; posting-account=Q4O-RQ0AAACAOoboVA7u2gmFIrRD8ogA Xref: g2news2.google.com comp.lang.ada:7211 Date: 2006-10-26T02:18:02-07:00 List-Id: Jade a =E9crit : > Hi > I am using GNAT's ada bindings and with functions like gethostname, etc > they choose to have a return value as a WIN32.PSTR. > However, all my ada functions require either ada standard strings or > characters. I was wondering if there is way of converting PSTR to an > ada string. > > Thanks, > > Jade. PSTR is simply a renaming for char * if I remember well. So you should be able to make simple conversions thanks to Ada.Interfaces.C To_C and To_Ada functions. Rgds Juan P=2ES. : Hello Philippe! ^^ (Sorry for the noise added)