GNATCOM comes with a number of sample applications that demonstrate how to use the GNATCOM framework and bindings created by the GNATCOM tools. Many of these applications require bindings be generated for COM components first. The batch file make.bat in the bindings directory will create the needed bindings.
The res directory contains any needed files to create the Win32 resource files for the samples.
Demonstrates creating a GUI front end to a command line application using the Internet Explorer Web Browser Control and handling COM events.
There are a number of different versions of this sample application (nt_gnatfind.adb) located in different directories.
Demonstrates use of ActiveX GUI Controls using the Internet Explorer Web Browser Control as the ActiveX control container, COM events, and using COM from Ada tasks.
There are a number of different versions of this sample application (spin.adb) located in different directories.
Demonstrates use of GNATCOM with ADO (Microsoft ActiveX Data Objects) to access an ODBC database.
The example (ado2.adb) is in the Samples/ directory. It requires that an ODBC DSN be created with the name ADOTEST pointing to the Access database in the Samples/res directory adotest.mdb.
The example (ado1.adb) is in the Samples/ directory. It uses the Access OLEDB provider to connect to an Access database instead of ODBC and does not require any ODBC or other configuration.
The example (ado3.adb) is in the Samples/ directory. It uses a UDL file found in the Samples/res directory to configure the connection via OLEDB to the access datatbase. UDL files are created by creating a blank file with the extension .udl. Once the file is created double clicking on it brings up the configuration application. It may be necessary to modify the configuration in the udl file in order for the example to work.
Demonstrates calling Java code by using the COM Java moniker.
The example (javacall.adb) is located in the Samples/ directory.
Demonstrates use of GNATCOM with Microsoft Message Queueing (MSMQ) one of the COM+ services available on Windows 2000 and with the Microsoft Option Pack 4.
The server (msmq_server.adb) and client (msmq_client.adb) applications are in the Samples/ directory.
Demonstrates methods of interfacing Ada code to Visual Basic.
Two projects AdaToVB and VBtoAda are located under the Samples/VB/ directory.