TAPI Calls Return LINEERR_OPERATIONUNAVAIL

Last reviewed: April 1, 1997
Article ID: Q162135
The information in this article applies to:
  • Microsoft Win32 Software Development Kit (SDK) for the following platforms: -Microsoft Windows NT, version 4.0 -Microsoft Windows 95

SUMMARY

With the release of TAPI 2.0, the default TAPI version in TAPI.H is set to 2.0. This can cause TAPI APIs called on Windows 95 to fail, and return LINEERR_OPERATIONUNAVAIL. This can be corrected by defining TAPI_CURRENT_VERSION to set the TAPI version to 1.4 before including TAPI.H, as follows:

   #define TAPI_CURRENT_VERSION 0x00010004
   #include <tapi.h>

MORE INFORMATION

The TAPI 2.0 implementation on Windows NT is fully UNICODE. This means there are A (Ansi) and W (Wide Character) versions of many TAPI APIs. By default, TAPI.H shipped with the Win32 SDK Version 4.0 assumes TAPI_CURRENT_VERSION as 2.0 and resolves TAPI calls to either Ansi versions of the APIs (lineMakeCall -> lineMakeCallA) or Wide character versions (lineMakeCall -> lineMakeCallW), depending on if the UNICODE constant is defined.

However, TAPI.DLL on Windows 95 does not export either the Wide or Ansi functions. When you run an application compiled using TAPI_CURRENT_VERSION >= 2.0 on Windows 95, TAPI fails to resolve these function names and reports LINEERR_OPERATIONUNAVAIL. If you set the TAPI_CURRENT_VERSION to < 2.0, it forces the TAPI.H header file to use the non-Unicode version of the APIs.

This most commonly occurs when you compile legacy TAPI application with the Win32 SDK shipped for Windows NT version 4.0 or Visual C++ version 4.2b.

The only way to compile an application that uses TAPI 2.0 on Windows NT and TAPI 1.4 on Windows 95 is to make all TAPI calls from a DLL and have two versions of the DLL, one for TAPI 2.0 and one for TAPI 1.4.


Keywords : kbprg kbusage Tapi
Version : 4.0
Platform : NT WINDOWS


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: April 1, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.