CTP File

The .CTP extension defines a CrossTalk Project file. CTP Projects list assemblies and classes that you want to use in your Delphi code. The CrossTalk Project Manager uses the project file to generate Delphi wrappers. Generally developers should use the CTP Manager to modify CTP files. This topic documents the internal format.

Sample CTP File

3.0

GAC:System.Xml, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
USER:C:\source\CrossTalk\source\CrossTalkRightTest\bin\Debug\CrossTalkRightTest.dll

#You can stick comments in this area with #
CrossTalkRightTest.DataSet1+CountryDataTable
CrossTalkRightTest.DataSet1+CountryRow
CrossTalkRightTest.DataSet1
CrossTalkRightTest.MyClass
System.Data.DataRow
System.Data.DataRowCollection
System.Text.StringBuilder
System.Xml.XmlReader
System.Xml.XmlReaderSettings
System.Xml.ConformanceLevel
System.Xml.XmlNodeType

Currently the CTP file consists of 3 sections, each terminated by a blank line or end of file. The sections in order are Header, Assembly List, and Class List.

Header Section

The header currently contains only one item.

The first line contains the version of the project file. This enables CrossTalk to verify that it knows how to read the data properly. Currently this must be set to 3.

Assembly List Section

This section contains a list of assemblies to load. Classes listed in the next section must exist in assemblies listed here, otherwise CrossTalk cannot locate them. The only exception to this rule is mscorlib which is already loaded and contains many of the classes in the System.x namespace. string, and StringBuilder for example are in mscorlib.

Assemblies are listed one per line. There are two types of entries classified by their prefix of GAC: or USER:

If the prefix is GAC:, it must be followed by a fully qualified name (FQN) of an assembly in the GAC.

Example:

GAC:System.Xml, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089

For user assemblies the full path and name are specified instead.

Example:

USER:C:\source\CrossTalk\source\CrossTalkRightTest\bin\Debug\CrossTalkRightTest.dll

The path listed here is only used on the developer machine by the CTP Manager. At runtime a different path is used for loading the user assembly.

Class List Section

The class list lists classes that you wish to access from Delphi. They mustbe in assemblies listed in the assembly list, or mscorlib. Classes are listed one per line and must be fully qualified.

Example:

System.Xml.XmlReader

Note that .NET uses + for nested classes.

CrossTalkRightTest.DataSet1+CountryRow