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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,fd037befc4df6bdc X-Google-Attributes: gid103376,public From: jerry@jvdsys.nextjk.stuyts.nl (Jerry van Dijk) Subject: Re: ObjectAda: LPCSTR -> STRING ? Date: 1998/01/11 Message-ID: <884553566.7snx@jvdsys.nextjk.stuyts.nl>#1/1 X-Deja-AN: 315624737 Distribution: world References: <68tgdg$c7c$1@cnn.Princeton.EDU> Organization: *JerryWare HQ*, Leiden, Holland Newsgroups: comp.lang.ada Date: 1998-01-11T00:00:00+00:00 List-Id: 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