Initialization and Shutdown in TAPI

For an application to use any of TAPI's basic or supplementary line functions, it needs a connection to TAPI through which it can receive messages. The application establishes this connection, using either the lineInitializeEx or the phoneInitializeEx function. The parameters of these functions allow the application to specify the message notification mechanism the application desires to use. Following are specifics about the initialization process:

Upon completion, the lineInitializeEx function returns two pieces of information to the application: an application handle and the number of available line devices.

After an application is finished calling TAPI's line functions, it calls lineShutdown and passes its application handle to terminate its usage of TAPI. This allows TAPI to free any resources assigned to the application.