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.4 required=5.0 tests=BAYES_00,FORGED_MUA_MOZILLA 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.129.169 with SMTP id nx9mr6439089pbb.2.1330619136657; Thu, 01 Mar 2012 08:25:36 -0800 (PST) Path: h9ni27268pbe.0!nntp.google.com!news1.google.com!news.glorb.com!npeer.de.kpn-eurorings.net!npeer-ng0.de.kpn-eurorings.net!newsfeed.arcor.de!newsspool4.arcor-online.net!news.arcor.de.POSTED!not-for-mail Date: Thu, 01 Mar 2012 17:25:36 +0100 From: Georg Bauhaus User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2 MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Using dll from a C# code 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> In-Reply-To: <8428126.175.1330614914704.JavaMail.geo-discussion-forums@ynnj12> Message-ID: <4f4fa300$0$6579$9b4e6d93@newsspool3.arcor-online.net> Organization: Arcor NNTP-Posting-Date: 01 Mar 2012 17:25:36 CET NNTP-Posting-Host: 9b1d560d.newsspool3.arcor-online.net X-Trace: DXC=iIf6W@VnP[>U`5g[@c]@J1McF=Q^Z^V384Fo<]lROoR18kFjeYMIE?nc\616M64>:Lh>_cHTX3j=TY=7ThSPW62 X-Complaints-To: usenet-abuse@arcor.de Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Date: 2012-03-01T17:25:36+01:00 List-Id: On 01.03.12 16:15, Rego, P. wrote: > Em quinta-feira, 1 de mar�o de 2012 11h38min52s UTC-3, gautier...@hotmail.com escreveu: >> Le jeudi 1 mars 2012 12:41:55 UTC+1, Rego, P. a �crit : >> >>> 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). > > I don't get it. So is not possible to import a C#/.NET method in dll in an Ada code? 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. 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. IINM, DLL in - .NET means libraries of O-O types with methods, in byte code. - Win32 means libraries of functions, processor instructions. 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. But then, using .NET types from A# programs means with-ing packages of .NET types, not importing single methods. public class VerifyClass { ... } 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.