Next: Tools, Previous: Introduction [Contents][Index]

## 2 GNATCOM Framework Overview

The GNATCOM framework allows for the creation of fully compliant COM objects providing full VTBL (virtual function table) support for custom interfaces in addition to the more limited automation (dynamic dispatch support through the COM interface IDispatch) used in most ActiveX controls. Additionally, BindCOM generates bindings to both custom interfaces (VTBL based) and interfaces offering the same performance boost of C++ over other languages in using COM objects but with Ada’s careful type safety features.

The GNATCOM framework provides a thick bindings to COM/DCOM/COM+ for using pre-existing components, creating new components, COM event handling, automation types, Error handling, GUID creation and conversion, and reading type libraries.

Key GNATCOM Packages

- GNATCOM

  Base package for the GNATCOM framework containing commonly used COM constants and automatic uninitializing of COM for the main thread.

- GNATCOM.Initialize

  COM initialization and uninitialization

- GNATCOM.GUID

  GUID creation and conversions

- GNATCOM.Interface

  Thick binding to COM’s IUnknown interface. Provides access to COM objects on local and remote systems, creation from Moniker strings (external representations of COM objects), automatic reference counting, and transparent querying for interfaces.

- GNATCOM.Dispinterface

  Thick binding to Automation objects. Provides a thick binding to dispinterfaces and interfaces derived from IDispatch (dual interfaces) including subprograms to call by name and call by id.

- GNATCOM.BSTR, GNATCOM.VARIANT, GNATCOM.SafeArray

  Thick bindings to COM/Automation types. Provides conversion to and from Ada types.

- GNATCOM.Errors

  Provides HRESULT to exception mapping and mapping of HRESULTs to human readable strings.

- GNATCOM.Events.Event_Object

  Dynamically creates a COM object supporting IDispatch that can be used with GNATCOM.Events subprograms to handle COM events.

- GNATCOM.Create

  Base package of the GNATCOM COM/DCOM/COM+ creation support.

- GNATCOM.Create.COM_Interface

  Provides an implementation of IUnknown for COM objects and provides the C++ style virtual function tables that comprise the COM binary standard for interfaces.

Next: Tools, Previous: Introduction [Contents][Index]