473,382 Members | 1,441 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,382 software developers and data experts.

2 ways of loading CLR??

I am reading applied .net programming by Jeffrey Richter. I am reading
about how the CLR gets loaded. From what I understand, that for all
other OSes except (XP, 2003 Server) the CLR is loaded by the x86 stub
in the .text section of the PE Header.

However for XP and windows 2003 the CLR is loaded by looking for a
directory entry. If the directory entry exists or is not 0 the CLR is
loaded.

Just curious to know why there are two ways of loading the CLR instead
of 1. Why can't all the OS look for the same directory entry. Or why
can't all the OSes load the CLR based on the stub call in the .text
section of the PE header.

regards,
Abhishek.
Nov 16 '05 #1
2 2842
This is my guess only, but for XP, Win 03, and other os'es that know about
the .net framework, it is more efficient to directly load the clr instead of
going through a stub program. There may be other things that this provides
(better security since NONE of the .exe is executed directly, ALL of it is
managed, etc).

However, in order to make the programs backwards compatible with older
os'es, they had to have a "legacy" way to invoke the clr. Take windows 98,
for example: You've installed the .NET Framework, but that doesn't mean that
that windows 98 OS knows how to do anything special with your .Net program.
It just sees the program as a windows .exe. It runs the .exe and what
happens "under the covers" is the stub program runs, invokes the CLR, and
then the CLR hosts your program.

I suppose part of the .Net framework install could have been some sort of
patch on old OS'es to make them more aware of .Net programs and how to run
them, but I'm guessing (again here) that it could have been a relatively big
undertaking for a relatively little gain.

Mike Mayer, Visual C# MVP
mi**@mag37.com
http://www.mag37.com/csharp/

"Abhishek Srivastava" <ab*****************@nospam.net> wrote in message
news:Oz**************@TK2MSFTNGP11.phx.gbl...
I am reading applied .net programming by Jeffrey Richter. I am reading
about how the CLR gets loaded. From what I understand, that for all
other OSes except (XP, 2003 Server) the CLR is loaded by the x86 stub
in the .text section of the PE Header.

However for XP and windows 2003 the CLR is loaded by looking for a
directory entry. If the directory entry exists or is not 0 the CLR is
loaded.

Just curious to know why there are two ways of loading the CLR instead
of 1. Why can't all the OS look for the same directory entry. Or why
can't all the OSes load the CLR based on the stub call in the .text
section of the PE header.

regards,
Abhishek.

Nov 16 '05 #2
Right. There was an OS modification in the XP timeframe to PE file and OS
support to support .NET natively and allow side by side assemblies.

--
-----
Sam Gentile
Microsoft MVP - C#/.NET
..NET Blog http://samgentile.com/blog/

Please do NOT contact me directly but respond to
the newsgroup instead.
---------
"Michael Mayer [C# MVP]" <mi**@mag37.com> wrote in message
news:OG**************@TK2MSFTNGP10.phx.gbl...
This is my guess only, but for XP, Win 03, and other os'es that know about
the .net framework, it is more efficient to directly load the clr instead
of
going through a stub program. There may be other things that this provides
(better security since NONE of the .exe is executed directly, ALL of it is
managed, etc).

However, in order to make the programs backwards compatible with older
os'es, they had to have a "legacy" way to invoke the clr. Take windows 98,
for example: You've installed the .NET Framework, but that doesn't mean
that
that windows 98 OS knows how to do anything special with your .Net
program.
It just sees the program as a windows .exe. It runs the .exe and what
happens "under the covers" is the stub program runs, invokes the CLR, and
then the CLR hosts your program.

I suppose part of the .Net framework install could have been some sort of
patch on old OS'es to make them more aware of .Net programs and how to run
them, but I'm guessing (again here) that it could have been a relatively
big
undertaking for a relatively little gain.

Mike Mayer, Visual C# MVP
mi**@mag37.com
http://www.mag37.com/csharp/

"Abhishek Srivastava" <ab*****************@nospam.net> wrote in message
news:Oz**************@TK2MSFTNGP11.phx.gbl...
I am reading applied .net programming by Jeffrey Richter. I am reading
about how the CLR gets loaded. From what I understand, that for all
other OSes except (XP, 2003 Server) the CLR is loaded by the x86 stub
in the .text section of the PE Header.

However for XP and windows 2003 the CLR is loaded by looking for a
directory entry. If the directory entry exists or is not 0 the CLR is
loaded.

Just curious to know why there are two ways of loading the CLR instead
of 1. Why can't all the OS look for the same directory entry. Or why
can't all the OSes load the CLR based on the stub call in the .text
section of the PE header.

regards,
Abhishek.


Nov 16 '05 #3

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

Similar topics

2
by: nntp | last post by:
Are there other ways to open multile windows at once? <SCRIPT language="JavaScript"> function open1() { var open1 = window.open('http://google.com/CheckEnviro.pl','','scrollbars=yes,height=600...
3
by: Roy Wang | last post by:
hi, My problem is how to determining when the XML file has loaded using javascript. I loaded an xml file using javascript in a web page. The code below is loading the xml file for IE:...
4
by: Adrian MacNair | last post by:
Hi, I created an image gallery which displays 63 images in a slideshow. The problem is that the show was slow because each image loaded one at a time during the show. No problem right? I just...
6
by: Curious George | last post by:
I have a page that takes about 10 seconds to load the first time it is run. I would like to first display a little animated gif telling the user that the page is loading. How do I do this with...
2
by: Abhishek Srivastava | last post by:
I am reading applied .net programming by Jeffrey Richter. I am reading about how the CLR gets loaded. From what I understand, that for all other OSes except (XP, 2003 Server) the CLR is loaded by...
2
by: Rob | last post by:
I was working on a project and everything was going fine, then all of a sudden the form set as my startup object stopped loading. I tried setting some others as the startup object, and some of my...
3
by: Holmes | last post by:
Hello Ran into a bit of a problem here and have now exhausted my resources to getting this working What I am trying to do is load and show a simple vb form with a listbox in it Dim...
3
by: matdumsa | last post by:
Hi there!!! I'm wondering what I've did wrong here... I try to do a gmail-like "loading" red square at top right... Here is my code: <div id=loading...
1
by: Just D | last post by:
All, Returning to WinForms - what is the current situation with the MS SQL Server database access? Did anybody see any good review or can just give us his own impression about that? I'd like to...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
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: 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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.