From: tmoran@acm.org
Subject: Re: PSTR to Ada String.
Date: Thu, 26 Oct 2006 16:22:22 -0500
Date: 2006-10-26T16:22:22-05:00 [thread overview]
Message-ID: <-fCdnYZ3s4WTutzYnZ2dnUVZ_tSdnZ2d@comcast.com> (raw)
In-Reply-To: 1161850402.541437.290580@k70g2000cwa.googlegroups.com
>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.)
next prev parent reply other threads:[~2006-10-26 21:22 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-25 20:50 PSTR to Ada String Jade
2006-10-26 7:56 ` Gerd
2006-10-26 8:13 ` Philippe Bertin
2006-10-26 21:22 ` tmoran [this message]
2006-10-26 9:18 ` jca.miranda
2006-10-30 13:22 ` Jade
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox