comp.lang.ada
 help / color / mirror / Atom feed
From: Georg Bauhaus <rm.dash-bauhaus@futureapps.de>
Subject: Re: Using dll from a C# code
Date: Thu, 01 Mar 2012 17:25:36 +0100
Date: 2012-03-01T17:25:36+01:00	[thread overview]
Message-ID: <4f4fa300$0$6579$9b4e6d93@newsspool3.arcor-online.net> (raw)
In-Reply-To: <8428126.175.1330614914704.JavaMail.geo-discussion-forums@ynnj12>

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.




  parent reply	other threads:[~2012-03-01 16:25 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 [this message]
2012-03-02 21:15               ` Rego, P.
2012-03-02  3:37 ` mjamesb
2012-03-02 21:17   ` Rego, P.
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox