Delphi Programming

After the latest change this reads a lot like spam now. Before it at least contained some background before starting the advertising. --Dummzeuch (talk) 10:36, August 15, 2018 (UTC)

The .Net Runtime Library for Delphi (CNClrLibrary) is the best library to work with .Net framework and .Net libraries from Delphi. It is designed to provide a way to interact with applications written in anyone of the .Net languages (such as C#, Visual Basic.Net, Delphi.Net, JScript.Net, etc) from Delphi.

CNClrLibrary allows Delphi to use .Net libraries without the need for registry entries, COM registrations, or changes to the .NET libraries.

Applications built with the .Net Runtime Library for Delphi will not require any dll files when deployed.

CNClrLibrary allows developers to create applications that can mix managed (.NET) and unmanaged ("native" Delphi) code in the same project.

Competitive Advantages[]

The following are some of the advantages the .Net Runtime Library for Delphi have over it competitors:

  • Full access to .Net Framework Class Library (Including new and emerging .NET technologies).
  • No extra dll is required when deployed.
  • No COM registration of .Net Libraries is required when deployed.
  • There are tools to generate your .Net Libraries into Delphi pas files.
  • Allows Delphi to consume .Net libraries as if they were native code.
  • Easy to use.

CNClrLibrary can do so much:[]

  • Access .Net Framework Class Library (such as Collections, Data Configuration, DataSets, Data Access, Database Connectivity, Diagnostics, IO, Linq, Dynamic Linq, System, Device and Application Management, Networking, Reflections, Security, Encryption, Cryptogrphy, Character Encoding and String Manipulation, XML etc).
  • Access Third Party .Net Libraries.
  • Access Your .Net Libraries.
  • Hosts the .Net Common Language Runtime (CLR) in Delphi.
  • Can load and access assemblies and their types from third party .Net libraries or your own .Net libraries or executable files.
  • Can load and access assemblies and their types from Global Assembly Cache (GAC)
  • Can invoke members of the loaded assembly types which includes constructor, fields, properties, methods and events.
  • Can invoke static members of the loaded assembly types which includes constructor, fields, properties, methods and events.
  • Can load and access assemblies and their types from Global Assembly Cache (GAC)
  • Can create instance of .Net object from the types of the assembly loaded.
  • Can handle .Net exceptions.
  • Can handle, access and invoke .Net events.
  • Can host .Net controls in Delphi VCL Forms.
  • Contains a utility for importing .Net libraries(third party or your own .Net libraries) or WSDL and for generating Delphi classes from the types of the imported libraries.
  • ...and many more.

.Net Runtime Library for Delphi Consists of:[]

1. Host Class Library[]

This is also called Delphi Host Class Library or DHCL. This Library contains Delphi classes and interfaces for starting and hosting the .Net Common Language Runtime (CLR) which allows Delphi applications to load and access .net assemblies, create object instance of the types from the loaded assembly, invoke the members of the types etc. The CLR manages memory, thread execution, code execution and other system services. LEARN MORE »

2. Framework Class Library[]

The Delphi Framework Class Library (DFCL) is a Delphi interface representation of the .NET Framework class library which is a collection of reusable types that tightly integrate with the Delphi Host Class Library. LEARN MORE »

Tools and Components[]

.Net Assembly/WSDL Importer[]

This is only available for Professional Edition User License. This tool allows users to import any .Net libraries(3p libraries or your own libraries) or WSDL and generates delphi pas files from the imported libraries using the classes and interfaces in the .Net Runtime Library. LEARN MORE »

.Net VCL for Delphi[]

  • Container VCL Control - This control allows a developer to host .Net controls in Delphi VCL Forms.
  • ADO.Net VCL for Delphi - Allows developers to create fastest and most reliable database connectivity solutions for any database using ADO.Net technology in Delphi.   

Example:[]

How to use .Net XML Classes to compare two element names[]

program XML; 

{$APPTYPE CONSOLE} 
{$R *.res} 
uses    CNClrLib.Xml,    CNClrLib.Core; 
var    NameTable: _NameTable;    Book, Price: Variant;    Settings: _XmlReaderSettings;    Reader: _XmlReader;    ReaderHelper: _XmlReaderHelper;    ObjectHelper: _ObjectHelper;  begin    NameTable := CoNameTable.CreateInstance;    Book := NameTable.Add('Book');    Price := NameTable.Add('Price'); 
   // Create the Reader. 
  Settings := CoXmlReaderSettings.CreateInstance; 
  Settings.NameTable := NameTable.AsXmlNameTable; 
  ReaderHelper := CoXmlReaderHelper.CreateInstance; 
  Reader := ReaderHelper.Create_1('books.xml', Settings); 
  Reader.MoveToContent; 
  Reader.ReadToDescendant('Book'); 
  ObjectHelper := CoObjectHelper.CreateInstance; 
  if ObjectHelper.ReferenceEquals(Book, Reader.Name) then    begin      // Do additional processing.    endend.

Deployment[]

  • Microsoft .Net Framework (Latest versions of Windows have .Net Framework pre-installed)
  • Basic Copy Deployment
    • Your application

For more information, go to https://crystalnet-tech.com/RuntimeLibrary/RuntimeLibrary4Delphi.aspx