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 autolearn=ham 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-7-bit Received: by 10.68.221.4 with SMTP id qa4mr8170605pbc.7.1330659447117; Thu, 01 Mar 2012 19:37:27 -0800 (PST) Path: h9ni29102pbe.0!nntp.google.com!news2.google.com!news1.google.com!Xl.tags.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local2.nntp.dca.giganews.com!nntp.posted.vianet!news.posted.vianet.POSTED!not-for-mail NNTP-Posting-Date: Thu, 01 Mar 2012 21:37:26 -0600 Date: Thu, 01 Mar 2012 22:37:25 -0500 From: mjamesb 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> In-Reply-To: <3622013.252.1330516368698.JavaMail.geo-discussion-forums@ynkz21> Message-ID: <8eSdnSciH-nr3c3SnZ2dnUVZ_hSdnZ2d@posted.vianet> X-Usenet-Provider: http://www.giganews.com NNTP-Posting-Host: 66.186.92.187 X-Trace: sv3-Ox5K+JHxQ0v6tMmp9vEqGt68gYBs9kckOtC5hIlHGJTC9oMgFLvBfhpLBXk58wmH2MudSiwx+oCPF7H!8BxJAevxQNywuAf73c3XzWwSXcr3tNrZqYvS8wG6nVE0xwBLfa2kweMqo1FVPw+sC8u+RmYIvADG!tBYYlVx+ X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 X-Original-Bytes: 1958 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Date: 2012-03-01T22:37:25-05:00 List-Id: > I have a method in C# which I need to export to Ada using a dll. Maybe If you're willing to try some MS C++ then the following item might be useful: http://stackoverflow.com/questions/1823466/how-to-call-a-net-dll-from-a-win32-process the comment portion of which is mostly (it has a code example): "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." Have fun. - mjamesb