Device Events (Telephony API)
TAPI responds to device changes such as a phone that has started ringing or a modem that has been removed by firing device events. A TAPI application should respond to a device event by querying for the specific change that has occurred and then taking appropriate action. An application may screen for events it will receive using event notification.
TAPI 2.x: Applications receive notification of device events using the LINE_LINEDEVSTATE message. The current status of an address is determined by calling lineGetAddressStatus, which returns its information in a LINEADDRESSSTATUS structure. The status of a specified open line device is obtained by calling lineGetLineDevStatus, which returns its information in a LINEDEVSTATUS structure.
TAPI 3.x: Applications receive an ADDRESS_EVENT notification, which is processed using the ITAddressEvent interface. The ITAddressCapabilities can then be used to acquire more detail information.