Installation requirements and instructions


System Requirements

The current version of the TWAPI extension supports Windows 2000, Windows XP and Windows 2003. TWAPI also requires Tcl 8.4 or higher. It will not load on older versions of Tcl.

Distribution formats

The distribution comes in three forms: a ZIP archive (""), a single file Tcl module ("") for Tcl 8.5 and above, and a Starkit ("twapi-VERSION.kit").

To install the ZIP distribution, unzip it into a directory and add the location of the twapi distribution directory to your Tcl auto_path variable.

The Tcl module distribution can be used with Tcl 8.5 or later. To install it, copy it into one of the directories returned by Tcl's ::tcl::tm::path list command.

The TWAPI Starkit distribution is self-contained except for the documentation. To use this distribution, simply use the Tcl source command to read it into your Tcl interpreter.

Some factors to consider in choosing the distribution:

  • The ZIP distribution is the most complete, including a test suite for testing the installation using Tcl's tcltest command. It also makes it easy to look through or adapt the Tcl script level code if required.
  • The Starkit is the most compact on-disk if distribution size is a factor.
  • The Tcl module distribution loads the fastest. However, it can only be used with Tcl 8.5 or later.
  • Both the Starkit and Tcl module distributions write the TWAPI DLL component to a temporary directory before calling the OS loader. They therefore cannot be used in read-only disk environments. However, this writing is done only the first time a specific TWAPI build is loaded. The written DLL is identified by a GUID that is specific to every TWAPI build and not rewritten if it already exists.

Loading TWAPI

Once installed, TWAPI can be loaded using the command package require twapi. Note that with the Starkit distribution, you still need to source the file before invoking this command.


Copyright © 2003-2007 Ashok P. Nadkarni

Tcl Windows API 2.0.12 Privacy policy