Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

An application that is based on Windows Embedded CE and that uses a modem must be able to handle tasks such as initializing the modem, opening the line, dialing a telephone number, closing the line, and disconnecting when the session is complete.

To create a modem connection by using TAPI
  1. Call the lineInitializeExfunction to initialize TAPI.

  2. Call the lineOpenfunction to open the line.

  3. Call the lineMakeCallfunction.

  4. Call the lineGetMessagefunction, as needed, to receive status messages from TAPI.

  5. Call the lineDeallocateCallfunction.

  6. Call the lineClosefunction to close the line connection.

  7. Call the lineShutdownfunction to end the session.

The lineInitializeExfunction returns the number of line devices that are available. If the LINEINITIALIZEEXOPTION_USEEVENT message is specified, no callback function is required, and you can use the lineGetMessagefunction to retrieve a TAPI message.

When the call is set up, TAPI returns a LINE_REPLY message. This message indicates only that the call has been established at the local end, which is indicated perhaps by a dial tone. The parameters for the lineMakeCallfunction are the telephone number to dial, the handle to a line device, and other parameters. As the connection process proceeds, TAPI returns a series of LINE_CALLSTATE messages to indicate the progress of the connection; for example, dial tone and ringing. When the connection is completed, TAPI returns a LINECALLSTATE_CONNECTED message.

During data transfer, TAPI continues to manage the connection, but the application handles data transmission and reception. When the transmission is complete, TAPI returns a LINE_CALLSTATE message, such as one that indicates that a remote disconnect has occurred.

See Also