tags:

views:

49

answers:

5

When I was reading regarding DLL on StackOverflow.... I came accross word, "Native DLLs" lot of times. I found questions regarding them..... But I couldn't understand What actually a "Native DLL" is?

Googling also didn't help me!

So I am asking as a curosity, What is a Native DLL?

A: 

From what I understand a "Native DLL" will be a basic Win32 dll for example. A DLL that contains non managed code.

With .NET you write Managed assemblies. These will call the base level Windows code which is the same that a non-managed application will call.

ChrisF
+1  A: 

A native dynamically linked library (dll) is a library provided by the operating system (mainly in the case of Microsoft Windows).

For example, shell32.dll, user32.dll and gdi32.dll are all Native DLLs in Windows XP, Vista and 7. You can write programs to ultilize native functionality in these libraries in the operating systems.

thephpdeveloper
Okey!! Thank You!!
Swanand Purankar
Native DLLs don't have to be a part of the operating system. Any DLL you author with a non-managed lanaguage is a native DLL.
Bevan
+3  A: 

Native DLL's are usually DLL's containing raw processor directly-executable code (such as that found in the Win32 API's) as opposed to, for example, managed (MSIL) which contain code that is consumed and JIT compiled to native processor instructions by a runtime such as the .NET CLR.

In .NET it is also possible to create mixed-mode DLL's that contain both native binary code and managed code.

Kev
They're called "Native" because the code they contain is "native" to the processor of the system, no translation required.
Bevan
@bevan - isn't that what I just said?
Kev
I thought you'd left out that "Native" is relative to the system hosting the DLL. Upon rereading, perhaps I was wrong.
Bevan
@bevan - I updated so that we are beyond doubt :)
Kev
+1  A: 

this term came out when managed code that comes from .net assemblies was invented, to distinguish between managed and unmanaged =native code. every .net assembly gets "nativied" by the JIT-compiler during execution. this means it gets translated to asm code that is "natively" understandable to the CPU.

Oops
+1  A: 

A quick look through these MSDN search results will answer your question:

http://social.msdn.microsoft.com/Search/en-US?query=define:%20native%20dll&ac=8

It's simple a DLL that contains machine code, rather than MSIL.

IanC