CrossTalk

CrossTalk allows Delphi (or C++) to use .NET libraries as if they were Delphi packages. Simply tell CrossTalk which .NET classes you want to use and let CrossTalk do the rest.

No need for registry entries, COM registrations, or changes to the .NET libraries. To deploy, just copy a few extra .dll files.

Example

All of the XML classes are .NET classes. CrossTalk makes them usable like native Delphi classes.

procedure TestXML();
var
  xSettings: XmlReaderSettings;
  xReader: XmlReader;
  xTestBool: boolean;
  xTestEnum: ConformanceLevel;
  xPath: string;
begin
  xSettings := XmlReaderSettings.Create; try
    xTestEnum := xSettings.ConformanceLevel;
    WriteLn(Int32(xTestEnum));
    xSettings.ConformanceLevel := ConformanceLevel.Fragment;
    xTestBool := xSettings.IgnoreWhitespace;
    WriteLn(xTestBool);
    xSettings.IgnoreWhitespace := true;
    xSettings.IgnoreComments := true;
    xPath := ExtractFilePath(ParamStr(0));
    xReader := XmlReader.CreateNET(xPath + '..\..\test.xml', xSettings);
    try
      while not xReader.EOF do begin
        if (xReader.MoveToContent = XmlNodeType.Element)
         and (xReader.Name = 'ProductName') then begin
          WriteLn('Product: ' + xReader.ReadString);
        end;
        xReader.Read;
      end;
      xReader.Close;
    finally xReader.Free; end;
  finally xSettings.Free; end;
end;

Introduction

More

  • Facebook – CrossTalk on Facebook. Developer updates, news and more.

Using CrossTalk