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,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.52.176.199 with SMTP id ck7mr43488939vdc.7.1439616121285; Fri, 14 Aug 2015 22:22:01 -0700 (PDT) X-Received: by 10.140.105.102 with SMTP id b93mr484412qgf.26.1439616121232; Fri, 14 Aug 2015 22:22:01 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!feeder.eternal-september.org!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!peer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!y105no603473qge.1!news-out.google.com!78ni11023qge.1!nntp.google.com!y105no603470qge.1!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Fri, 14 Aug 2015 22:22:00 -0700 (PDT) In-Reply-To: <14f6844a-0950-4157-80af-d6a962a56246@googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=2a02:120b:c3e3:8d30:4834:9997:cbd1:d1a8; posting-account=gRqrnQkAAAAC_02ynnhqGk1VRQlve6ZG NNTP-Posting-Host: 2a02:120b:c3e3:8d30:4834:9997:cbd1:d1a8 References: <1215a889y9uxf$.1nolkb1ctch79$.dlg@40tude.net> <14f6844a-0950-4157-80af-d6a962a56246@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <2d5be9db-145c-4f96-ba94-18b73b82d532@googlegroups.com> Subject: Re: pragma/aspect Import, Convention parameters From: gautier_niouzes@hotmail.com Injection-Date: Sat, 15 Aug 2015 05:22:01 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Received-Bytes: 2292 X-Received-Body-CRC: 2288885020 Xref: news.eternal-september.org comp.lang.ada:27455 Date: 2015-08-14T22:22:00-07:00 List-Id: Le vendredi 14 ao=FBt 2015 01:42:30 UTC+2, David Botton a =E9crit=A0: > In GWindows I used expressions based on the Win32 API that one chose to s= upport. Windows has a duplicate Ansi and UNICODE set of APIs. It worked out= well. It work*s*, and to the full satisfaction of its users :-) ! To be more concrete, GWindows spec. has this (the file gwindows.ads depends= on whether ANSI or UNICODE is used): Character_Mode_Identifier : constant String :=3D "W"; and there are at hundreds of places in children packages: procedure GetTextMetrics (HDC : in GWindows.Types.Handle; M : out Font_Metrics_W); pragma Import (StdCall, GetTextMetrics, "GetTextMetrics" & Character_Mode_Identifier); So, having the convention as a string could be helpful if one needs to swit= ch between C and StdCall as well. _________________________ Gautier's Ada programming http://gautiersblog.blogspot.com/search/label/Ada NB: follow the above link for a valid e-mail address