Microsoft KB Archive/201521

{|
 * width="100%"|

INFO: lineMakeCall Fails with LINEERR_RESOURCEUNAVAIL

 * }

Q201521

-

The information in this article applies to:


 * Microsoft Win32 Application Programming Interface (API), used with:
 * Microsoft Windows 98
 * Microsoft Windows 95
 * Microsoft Windows NT Server version 4.0
 * Microsoft Windows NT Workstation version 4.0
 * the operating system: Microsoft Windows 2000

-

SUMMARY
A call to the lineMakeCall function fails with LINEERR_RESOURCEUNAVAIL if Unimodem fails to open the communication port that is associated with the modem.

MORE INFORMATION
The most obvious reason why lineMakeCall fails with LINEERR_RESOURCEUNAVAIL is that a non-TAPI application already has the hardware device open. Because only one application can open a communications port, any non-TAPI application that has the port open prevents Unimodem (and thus TAPI applications) from accessing the port.

If a non-TAPI application is not accessing the port, then tracking down the cause of this error becomes more difficult. Possible reasons include:


 * Two service providers are accessing the same port at the same time.
 * Unimodem has two modems that map down to the same port, and one is in use. It is fairly common for developers to have more than one modem installed on a single communications port, and to use a switch box to toggle between them. Only one modem can be used at a time.
 * Another TAPI application has already requested a handle to the comm port. Unimodem allows only one handle other than its own to be in use at a time.
 * Similiar to the third item, but the current application has previously requested a handle to the comm port and failed to close it. This always occurs on the second call, after the application has successfully connected the previous call. It is very important that TAPI applications close all Win32 handles returned from lineGetID.