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,6b4015030847e90a X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local01.nntp.dca.giganews.com!nntp.comcast.com!news.comcast.com.POSTED!not-for-mail NNTP-Posting-Date: Thu, 26 Oct 2006 16:22:22 -0500 From: tmoran@acm.org Newsgroups: comp.lang.ada Subject: Re: PSTR to Ada String. References: <1161850402.541437.290580@k70g2000cwa.googlegroups.com> X-Newsreader: Tom's custom newsreader Message-ID: <-fCdnYZ3s4WTutzYnZ2dnUVZ_tSdnZ2d@comcast.com> Date: Thu, 26 Oct 2006 16:22:22 -0500 NNTP-Posting-Host: 67.164.83.70 X-Trace: sv3-s19CJVPAAaS3Gm0O0JdsmPLF6ApHNIwmdCgx91Ko5S+GPZrBJ98s+Ib7u3zpqDLGuB0OdsQ+JbyoGAU!C34oD5xqN6RKMmYxIkrlvUoksxfqDPTSNY8YH6gwA/k9ImGFUUlhiLcXq1pho8EHSPnJ7c7kh13T!UrEb6VsNmsFhfw== X-Complaints-To: abuse@comcast.net X-DMCA-Complaints-To: dmca@comcast.net X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.32 Xref: g2news2.google.com comp.lang.ada:7223 Date: 2006-10-26T16:22:22-05:00 List-Id: >You may want to have a look at GtkAda, which is an Ada binding to the >(C-written) gtk library. There's good examples in there on how to ... Or at Claw, whose Claw.Sockets does: function gethostname(Name : Claw.Win32.Lpcstr; Length : Claw.Int) return Claw.Int; pragma Import(Stdcall, gethostname, "gethostname"); ... Local_Name : Interfaces.C.Char_Array(0 .. 200); ... Err := gethostname(Local_Name(0)'unchecked_access, Claw.Int(Local_Name'length)); if Err = Socket_Error then > function AddrToPSTR is new Unchecked_Conversion(System.Address, > Win32.PSTR); Locks you into certain compilers. (A design requirement of Claw was portability across 4 Ada->Windows compilers.)