Early and Late Binding

ASCOM drivers are Windows Object/COM/ActiveX object servers. They use the Windows component object support that is built into all versions of the Windows OS. Drivers expose the standard set of properties and methods ('members") as defined by the relevant ASCOM interface specification. Client software creates an instance of the driver via an OS call, then calls its members to effect control of the device.

There are two ways to access the members of a COM object: early and late binding. Early binding establishes a low-overhead binary linkage between the client program and the driver by compiling the member entry points and parameter signatures into the client software. Late binding uses the operating system to translate names and paremeter lists at run time into calls to the driver's members. This has higher overhead but allows each driver to have its own binary interface structure and eliminates driver-specific binary code from being compiled into the client software. It's beyond the scope of this article to describe these mechanisms in more detail, please refer to the COM documentation available on the net.

ASCOM Drivers Support Late Binding Only

Since the inception of ASCOM, drivers have been required to support late binding. In ASCOM Platform 5, early binding support in drivers was introduced. This turned out to be a mistake, and as of ASCOM Platform 6, drivers again are required only to support late binding. This means that your driver must expose the required properties and methods via a "dispatch" interface. How this is done varies by language, but it is possible in many languages. Thus many languages may be used to create drivers.

The fact that drivers expose late bound interfaces created an additional burden on application developers who use C++. These application developers are required to implement their property and method calls via GetIdsOfNames() and Invoke(). It is not difficult to create wrapper classes that handle this, but a knowledge of COM is required. For .NET application developers (both VB and C#) the ASCOM Platform includes the .NET Client Toolkit, a library assembly that makes driver usage really easy, and provides Intellisense besides. Most higher level languages and scripting languages handle access to late bound objects transparently; you won't even know.