다음을 통해 공유


Establishing a Modem Connection (Windows CE 5.0)

Send Feedback

An application that is based on Windows 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 lineInitializeEx function to initialize TAPI.
  2. Call the lineOpen function to open the line.
  3. Call the lineMakeCall function.
  4. Call the lineGetMessage function, as needed, to receive status messages from TAPI.
  5. Call the lineDeallocateCall function.
  6. Call the lineClose function to close the line connection.
  7. Call the lineShutdown function to end the session.

The lineInitializeEx function 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 lineGetMessage function 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 lineMakeCall function 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

TAPI Application Development | Initializing TAPI | Resource Inventory and Version Negotiation | Opening a Line | Making a Phone Call | Using the Callback Function | Address Translation | Incoming Calls | Shutting Down TAPI | Supplementary Telephony Functions | TAPI Functions

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.