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.135.231 with SMTP id pv7mr5531661pbb.8.1330723033567; Fri, 02 Mar 2012 13:17:13 -0800 (PST) Path: h9ni31922pbe.0!nntp.google.com!news2.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:17:13 -0800 (PST) Organization: http://groups.google.com Message-ID: <28136526.191.1330723033226.JavaMail.geo-discussion-forums@yner4> References: <3622013.252.1330516368698.JavaMail.geo-discussion-forums@ynkz21> <8eSdnSciH-nr3c3SnZ2dnUVZ_hSdnZ2d@posted.vianet> NNTP-Posting-Host: 201.7.145.1 Mime-Version: 1.0 X-Trace: posting.google.com 1330723033 19494 127.0.0.1 (2 Mar 2012 21:17:13 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Fri, 2 Mar 2012 21:17:13 +0000 (UTC) In-Reply-To: <8eSdnSciH-nr3c3SnZ2dnUVZ_hSdnZ2d@posted.vianet> 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:17:13-08:00 List-Id: Em sexta-feira, 2 de mar=E7o de 2012 00h37min25s UTC-3, mjamesb escreveu: > > I have a method in C# which I need to export to Ada using a dll. Maybe >=20 > If you're willing to try some MS C++ then the following item might > be useful: >=20 > http://stackoverflow.com/questions/1823466/how-to-call-a-net-dll-from-a= -win32-process >=20 > the comment portion of which is mostly (it has a code example): >=20 > "Another option is to use C++/CLI as a bridge. People are mostly > familiar with using it to wrap unmanaged APIs to expose to managed > code, but it actually works both ways - it is possible to compile > with /clr, and yet produce a .dll assembly with plain unmanaged > exports, which can be called from unmanaged code as usual. > ... > In practice it will load CLR runtime into the calling process > (unless it's already loaded there) and dispatch from native code > to managed code transparently - all the magic is done by C++/CLI > compiler." >=20 > Have fun. >=20 > - mjamesb Em sexta-feira, 2 de mar=E7o de 2012 00h37min25s UTC-3, mjamesb escreveu: > > I have a method in C# which I need to export to Ada using a dll. Maybe >=20 > If you're willing to try some MS C++ then the following item might > be useful: >=20 > http://stackoverflow.com/questions/1823466/how-to-call-a-net-dll-from-a= -win32-process >=20 > the comment portion of which is mostly (it has a code example): >=20 > "Another option is to use C++/CLI as a bridge. People are mostly > familiar with using it to wrap unmanaged APIs to expose to managed > code, but it actually works both ways - it is possible to compile > with /clr, and yet produce a .dll assembly with plain unmanaged > exports, which can be called from unmanaged code as usual. > ... > In practice it will load CLR runtime into the calling process > (unless it's already loaded there) and dispatch from native code > to managed code transparently - all the magic is done by C++/CLI > compiler." >=20 > Have fun. >=20 > - mjamesb The idea of the bridge is interesting.