From: Gautier write-only <gautier_niouzes@hotmail.com>
Subject: Re: Using dll from a C# code
Date: Thu, 1 Mar 2012 08:24:23 -0800 (PST)
Date: 2012-03-01T08:24:23-08:00 [thread overview]
Message-ID: <233c1697-d402-49a7-a556-df74cd783169@do4g2000vbb.googlegroups.com> (raw)
In-Reply-To: 8428126.175.1330614914704.JavaMail.geo-discussion-forums@ynnj12
On 1 mar, 16:15, "Rego, P." <pvr...@gmail.com> 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?
Yes, you can :-).
What you can't is mixing different machines.
Your PC with an Intel processor and Windows is a different machine
than the .NET virtual platform, with MSIL as machine code.
If you compile a module with language X into machine code for machine
A, and another module with language Y into another machine code,
machine B/=A, you won't be able to make both work together.
For instance you won't make a Commodore 64 machine code and a PC
machine code work together.
Perhaps if you think to a Commodore 64 emulator instead of the .NET
platform, it will be clearer.
So you need to find a common machine for compiling both languages.
For C#, only one choice: MSIL
For Ada, you have plenty of choices: Windows&Intel32/64,
Linux&Intel32/64/..., MacOSX&PowerPC/Intel, JVM, MSIL, UNIX,
OpenVMS, ...
And, hurray, you realize there is one common target machine in the
list: MSIL.
So you have to use the GNAT-for-.NET, not the GNAT-for-Windows.
Got it ?
next prev parent reply other threads:[~2012-03-01 16:24 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 [this message]
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.
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox