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=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,889b07ac9e6ac6a3 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Received: by 10.68.221.4 with SMTP id qa4mr10773946pbc.7.1330722951690; Fri, 02 Mar 2012 13:15:51 -0800 (PST) Path: h9ni31919pbe.0!nntp.google.com!news1.google.com!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail From: "Rego, P." Newsgroups: comp.lang.ada Subject: Re: Using dll from a C# code Date: Fri, 2 Mar 2012 13:15:51 -0800 (PST) Organization: http://groups.google.com Message-ID: <8861499.6.1330722951395.JavaMail.geo-discussion-forums@ynel5> References: <3622013.252.1330516368698.JavaMail.geo-discussion-forums@ynkz21> <189548.691.1330568785536.JavaMail.geo-discussion-forums@ynlt17> <2d391aa2-23ed-4c29-96a5-3292ae13bfb7@l7g2000vbw.googlegroups.com> <24322569.1107.1330602115411.JavaMail.geo-discussion-forums@ynjd19> <171511.1487.1330612732304.JavaMail.geo-discussion-forums@vbw15> <8428126.175.1330614914704.JavaMail.geo-discussion-forums@ynnj12> <4f4fa300$0$6579$9b4e6d93@newsspool3.arcor-online.net> NNTP-Posting-Host: 201.7.145.1 Mime-Version: 1.0 X-Trace: posting.google.com 1330722951 18792 127.0.0.1 (2 Mar 2012 21:15:51 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Fri, 2 Mar 2012 21:15:51 +0000 (UTC) In-Reply-To: <4f4fa300$0$6579$9b4e6d93@newsspool3.arcor-online.net> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=201.7.145.1; posting-account=TRgI1QoAAABSsYi-ox3Pi6N-JEKKU0cu User-Agent: G2/1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Date: 2012-03-02T13:15:51-08:00 List-Id: Em quinta-feira, 1 de mar=E7o de 2012 13h25min36s UTC-3, Georg Bauhaus esc= reveu: > On 01.03.12 16:15, Rego, P. wrote: > > Em quinta-feira, 1 de mar=E7o de 2012 11h38min52s UTC-3, gautier...@hot= mail.com escreveu: > >> Le jeudi 1 mars 2012 12:41:55 UTC+1, Rego, P. a =E9crit : > >> > >>> Actually no. I am using native .NET for generating the dll. So I just= run C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319 /t:library simple.cs > >> > >> A .NET DLL is not a traditional DLL and has not Intel machine code in = it. > >> It was called DLL just to avoid disturbing some people (and confusing = other).=20 > >=20 > > I don't get it. So is not possible to import a C#/.NET method in dll in= an Ada code? >=20 > It is possible to import a method of a .NET type into a native > Ada program if it is possible to import a method of a .NET type > into a native C++ program, i.e. not into a C++/CLI program, > but into a C++ program that is compiled with a C++ compiler > that generates processor instructions, not .NET byte code. >=20 > Similar possibilities exist for importing methods of a compiled > Java class (JVM byte code) into an Ada program that is compiled > into Intel/AMD processor instructions. >=20 > IINM, DLL in > - .NET means libraries of O-O types with methods, in byte code. > - Win32 means libraries of functions, processor instructions. >=20 > The Windows(TM) platforms are many. It is necessary to pick > compilers for compatible targets. For example, A# (GNAT for .NET) > with one of the .NET compilers by Microsoft. >=20 > But then, using .NET types from A# programs means with-ing > packages of .NET types, not importing single methods. >=20 > public class VerifyClass { ... } >=20 > will become a tagged type on the Ada side, and you use > this Ada type almost as usual in O-O Ada. There will a pointer to > the reference handling objects of imported type VerifyClass. I understand. Thanks.