How to connect Modem to telephone ?
A. Antti Keskinen quoted :- You should use TAPI (Telephony API) instead of Win32 CreateFile. See Visual Studio docs or MSDN for a reference and examples. TAPI is installed with Platform SDK, so it comes bundled with most Visual Studio distributions, and/or you can download it from the Internet as well. TAPI has a function pair called lineGenerateDigits and lineGatherDigits that generate and gather pulse sequences that represent numbers. You can also send and monitor individual pulses with lineGenerateTone and lineMonitorTone. These functions only exist in TAPI version 2.x. In version 3.x, the COM model is introduced, and everything running on the phone line is considered a stream, with terminal objects acting as sinks. For your case, I suggest TAPI 2.x, if possible. The COM model is too complex for the functionality you require.