473,385 Members | 1,535 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Unmanaged C++ to MSIL??

Hi all,
I have a lot of confusion about what this runtime environment is.

When I write an application with unmanaged code and unmanaged data, can
I compile it to the MSIL, or it will compile mandatorily to the x86
instruction set?


If I can compile to MSIL:

In this case it will probably run also on WindowsXP on Alpha and Itanium
architectures where there is the .Net runtime by Microsoft, right?

But then why the go-mono people say that their .net environment
implementation cannot run partially unmanaged code? Is it just "their"
fault? What is the "part" of the runtime enviromnent that is lacking in
their implementation?
Nov 17 '05 #1
1 1790
John Doe wrote:
Hi all,
I have a lot of confusion about what this runtime environment is.

When I write an application with unmanaged code and unmanaged data,
can I compile it to the MSIL, or it will compile mandatorily to the
x86 instruction set?
Unmanaged code is by definition not MSIL but IA32 machine language. You can
compile that same code using /clr and the compiler will generate MSIL and
some native code (a few operations can't be represented in IL). When you
compile with /clr you have managed code, but you don't have CLS-compliant
code: it can't be called from any other .NET language.
If I can compile to MSIL:

In this case it will probably run also on WindowsXP on Alpha and
Itanium architectures where there is the .Net runtime by Microsoft,
right?
If it's pure MSIL, yes. You have to adhere to specific procedures/idioms to
get a pure MSIL image out of VC++.
But then why the go-mono people say that their .net environment
implementation cannot run partially unmanaged code? Is it just "their"
fault? What is the "part" of the runtime enviromnent that is lacking
in their implementation?


I guess because they haven't implemented support for mixed-mode assemblies.
That may be outside the ECMA spec for the CLR - I'd guess it probably is.
In any case, you certainly can't take a mixed-mode assembly and run it on an
architecture for which is was not compiled.

-cd
Nov 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: JKJ | last post by:
Short answer: no. C# apps must run within the .NET framework. You can 'ngen' the assembly, but the framework must still exist on the target machine to read all of the assembly's metadata, and...
9
by: Andrew Cumming | last post by:
I am having trouble using Platform Invoke to call C++ DLLs from C# windows applications. The DLLs seem to load, but I get run-time errors to the effect that the named entry points cannot be found....
14
by: Jon | last post by:
Whether I can compile a class or not, depends on the order of functions in my class. My question is (see example below): 1) Is it a bug that the class 'WillCompile' will compile and execute, or...
1
by: Sparhawk | last post by:
Hi, my company is going to migrate a large VC++ application to .NET to make use of Windows Forms (the old class library is not updated any more). We are not planning to migrate the rest of the...
2
by: J | last post by:
Compiling a straight C++ module under VC++ 7 would seem to autogen an 'IJW' type .NET module, even if the module has standard VC++ syntax. I'm assuming that the 'unmanaged' flag would have no...
11
by: Jarod_24 | last post by:
What is 'Unmanaged Code', and what is 'Managed Code'?
6
by: nicolas.hilaire | last post by:
Hi all, i'm not totally clear with some concepts about managed and unmanaged code. I'm asking myself some questions : - i've a MFC app, i want to use the framework dotnet by switching to...
2
by: Joe | last post by:
I am trying to get a good understanding of these concepts and how they apply to code and classes (possibly different). As well as MSIL and Native Code (x86 assembly). To facilitate discussion...
13
by: =?Utf-8?B?d3BjbWFtZQ==?= | last post by:
I have a small C++/CLI application which calls an unmanaged lib. It seems like I can't use /clr:pure and link with the unmanaged lib (LNK1313 error). The problem I have is that compiling with...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.