From: "Rego, P." <pvrego@gmail.com>
Subject: Re: Using dll from a C# code
Date: Fri, 2 Mar 2012 13:17:13 -0800 (PST)
Date: 2012-03-02T13:17:13-08:00 [thread overview]
Message-ID: <28136526.191.1330723033226.JavaMail.geo-discussion-forums@yner4> (raw)
In-Reply-To: <8eSdnSciH-nr3c3SnZ2dnUVZ_hSdnZ2d@posted.vianet>
Em sexta-feira, 2 de março de 2012 00h37min25s UTC-3, mjamesb escreveu:
> > 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
Em sexta-feira, 2 de março de 2012 00h37min25s UTC-3, mjamesb escreveu:
> > 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
The idea of the bridge is interesting.
prev parent reply other threads:[~2012-03-02 21:17 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-29 11:52 Using dll from a C# code Rego, P.
2012-02-29 20:00 ` Shark8
2012-03-01 2:26 ` Rego, P.
2012-03-01 5:38 ` Gautier write-only
2012-03-01 11:41 ` Rego, P.
2012-03-01 13:16 ` Georg Bauhaus
2012-03-01 14:38 ` gautier_niouzes
2012-03-01 15:15 ` Rego, P.
2012-03-01 16:24 ` Gautier write-only
2012-03-02 20:03 ` Rego, P.
2012-03-01 16:25 ` Georg Bauhaus
2012-03-02 21:15 ` Rego, P.
2012-03-02 3:37 ` mjamesb
2012-03-02 21:17 ` Rego, P. [this message]
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox