comp.lang.ada
 help / color / mirror / Atom feed
From: jerry@jvdsys.nextjk.stuyts.nl (Jerry van Dijk)
Subject: Re: ObjectAda: LPCSTR -> STRING ?
Date: 1998/01/11
Date: 1998-01-11T00:00:00+00:00	[thread overview]
Message-ID: <884553566.7snx@jvdsys.nextjk.stuyts.nl> (raw)
In-Reply-To: 68tgdg$c7c$1@cnn.Princeton.EDU


In article <68tgdg$c7c$1@cnn.Princeton.EDU> mcc@tyrolia.cs.princeton.edu writes:

>>I'm working with Aonix ObjectAda 7.1 and I need to figure
>>out a way to convert a LPCSTR to an Ada STRING.  I'd appreciate
>>any help.  Thanks.

>LPCSTR is equivalent to C's (const char *).

Why not simply use something like:

with System.C.Strings; use System.C.Strings;

Win_String : Win32.LPCSTR := -- get the string;

Ada_String : String := Value(chars_ptr(Win_String));

--

-- Jerry van Dijk | Leiden, Holland
-- Consultant     | Team Ada
-- Ordina Finance | jdijk@acm.org




  reply	other threads:[~1998-01-11  0:00 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-01-05  0:00 ObjectAda: LPCSTR -> STRING ? matthew_snyder
1998-01-06  0:00 ` Martin C. Carlisle
1998-01-11  0:00   ` Jerry van Dijk [this message]
1998-01-12  0:00   ` Pascal Obry
1998-01-06  0:00 ` Robin Stephe Nora
1998-01-06  0:00   ` Robert Dewar
1998-01-07  0:00     ` Stephen Leake
  -- strict thread matches above, loose matches on Subject: below --
1998-01-20  0:00 matthew_snyder
1998-01-21  0:00 ` Pascal Obry
replies disabled

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