Regarding Components dll

sandeep2911

Member
Joined
Nov 15, 2005
Messages
6
Programming Experience
Beginner
Hi
I want to know in what form(IL or native code) is the component dll file in, when we build the classlibrary project; after adding a component in it. I hope you get my question.

Thanks in advance,

- Sandeep.
 
Well, and please don't quote me on this..... and also if i'm understanding your question properly

A DLL when compiled is a Binary File.

Is this the question you wanted answering here? or have i missed the mark by a mile?
 
DLL == binary file,ok.So this means its native(machine) code.Well, if that is it, then I would like to know if there is any 'physical' existance of Microsofts Intermediate Language code on my machine, after building/compiling of any of my project.
(I again hope that I know wht I want to ask, and what I am actually asking :) )

Any help appreciated,

-Sandeep
 
I believe the answer to that is Yes. All projects be it in c# or vb.net with the exclusion of DLL's compile into MSIL. The .exe that is produced is all subsequently converted to MSIL. It' only when the exe is run on a specific operating system that the Just In Time Compiler then converts it into native code.

Is that what you were getting at?
 
Let me put my Question in two parts.

Part 1> When I build any of my .net project, it gets converted into an EXE, right? And that exe is in MSIL?

Now the second part is dependent on whether I got myself right in the first part.
So tell me if i got it correct in the first,den I can move on to my main 2nd part.

Thanks,

-Sandeep
 
.net dll's are compiled to MSIL code and the framework's JIT compiler convert's it to machine language on the fly same as .net exe files
 
JuggaloBrotha said:
.net dll's are compiled to MSIL code and the framework's JIT compiler convert's it to machine language on the fly same as .net exe files

Thanks a lot!That cleared most of the mist.But still, there are some doubts in my mind. :)

1> .net dlls are 'compiled' to MSIL.Is this equivalent to saying, .net DLLs 'are' in MSIL?
2> Does .exe mean native code? Does a binary file mean, a file in native code?
3> Is .exe the 'only' extension for an executable file?(in Windows)What about Linux?

4> How are all these files-.EXEs, .DLLs, native code, and MSIL related to each other?

5> What exactly happens when I build(ie compile i guess) any .net project?does it create an exe in msil, or what?


Thanks

-Sandeep

P.S: I have deviated a lot from my main doubt .Probably because i think i got its answer in your reply.But the above doubts got created in the process :).
 
1. MSIL code is Microsoft Intermediate Language of which the JIT compiler converts it on the fly to binary (machine language), this enables any operating system with the equivalent .net framework to run any .net application (IE you run your .net windows application on macintosh and linux; for Linux the framework is called Mono)

yes .net dll's and .net exe's are compiled in MSIL

2. what's native code? do you mean 'native code' as in 'source code'?

3. it's .exe because users of Linux, Mac, and Windows know what exe's are and this allows even the average person to know how to manually start .net applications (though when distributing your applications you should place shortcut's with icons on their desktop and startmenu's)

but .net applications are compiled to MSIL code with the approprate extension's (.dll and .exe) it's the JIT compiler that converts it to binary when you run the program(s) ... (hence the slight delay in displaying the main form when loading the application)

4. .net exe's and dll's are compiled to MSIL code, exe's are meant to be ran directly, dll's are libraries containing controls, functions, methods but can't be ran by themselves, exe's reference the dll's
dll's allow you to re-use large amount's of code without having to copy&paste it into every project and re-compile the same stuff, but using dll's it's already compiled to MSIL and all ya do is call the stuff ya need without re-writing the code over and over again

5. when you run your .net application (even when debugging) the IDE compiles the project to MSIL code then run's the output exe file in which the JIT compiler in the framework does it's thing
-------------------------------------
it's good to ask questions especially when you're contemplating a major change
luckily you can run vb6 and vb.net side by side on the same system with no troubles so you can use both while migrating to .net
 
Thanks! that clears everything!!

Just check if I got everything right;

- .DLLs and .EXEs when built(not run), are in MSIL. They get convrted to machine code(ie native code, native 'only' to that particular m/c) as an when read by the JIT. And this conversion occurs when we 'run' our project-both with or without the debugger.

- .exe is an 'independent'(unlike .DLL, which is dependent) executable file. And it is present with the '.exe' extension in both Win and Linux.

- Finally, .exe in .net is NOT a binary file, its in MSIL, which gets converted to binary when we run it.And JIT is responsible for this.(same as the 1st :) )

One more doubt.
We need CLR to run .NET applications on any machine.Do we have one for Linux or say even for Mac?


THANKS AGAIN!

-Sandeep
 
1. yes
2. yes
3. yes

the CLR is also in the framework and the IDE takes care of that as you write the program, so dont worry about it
 
Back
Top