RAD Studio
ContentsIndex
PreviousUpNext
Using .NET Assemblies with Delphi

The Microsoft .NET Framework and the Common Language Runtime (CLR) provide a runtime environment in which components written in .NET languages can seamlessly interact with each other. A compiler for a .NET language does not emit native machine code. Instead, the language is compiled to an intermediate, platform neutral form called Microsoft Intermediate Language (MSIL, or IL for short). The modules containing IL code are linked together to form an assembly. An assembly can be made up of multiple modules, or it can be a single file. In either case, an assembly is a self-describing entity; it holds information about the types it contains, the modules that comprise the assembly, and dependencies on other assemblies. An assembly is the basic unit of deployment in the .NET development environment, and the CLR manages loading, compilation to native machine code, and subsequent execution of that code. Applications that run entirely within the context of the CLR are called managed code

One of the services provided by the CLR is the ability for managed code to call on unmanaged code, that is, code that was compiled to native machine language and which does not execute within the environment of the CLR. For example, through a service called Platform Invoke (often shortened to PInvoke), managed code can call on native Win32 APIs. This ability extends to using legacy COM objects from a managed .NET application. The ability to interoperate between managed code and COM objects also goes in the other direction, making it possible to expose .NET components to unmanaged applications. To the unmanaged application, loading and accessing the .NET component almost entirely the same as accessing any other COM object.

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!