INFO: lineMakeCall() Fails with LINEERR_RESOURCEUNAVAIL (201521)



The information in this article applies to:

  • Microsoft Win32 Application Programming Interface (API), when used with:
    • the operating system: Microsoft Windows 95
    • the operating system: Microsoft Windows 98
    • the operating system: Microsoft Windows NT 4.0
    • the operating system: Microsoft Windows 2000
    • the operating system: Microsoft Windows XP

This article was previously published under Q201521

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().

REFERENCES

Please see the following reference:
  • Win32SDK Documentation
  • TAPICOMM Sample

Modification Type:MajorLast Reviewed:12/17/2003
Keywords:kbAPI kbFAQ kbinfo kbKernBase kbTAPI KB201521