Categories: MSDN / DotNet / Java / Scripts / Linux / PHP Ask - La ask - La Answer

Modem Programming

Hi,
I want to program my modem thru vc++ or C by using WIN32 API.
OS-NT 4.0 Sevice Pack 4.0 or greater.
How to connect my modem?
I want to perform the following tasks.
Connect to end-user telephone
Some communication will be done
Detect end user telephone status
and others

Articles, source codes, books all welcome

Thank you,
Siva
[385 byte] By [Siva] at [2007-11-10 12:52:24]
# 1 Re: Modem Programming
You want to connect to a end-user telephone using a modem ? Or maybe you want
to connect to another modem ! Anyway...
I'm using the CreateFile / WriteFile / ReadFile API to communicate using
my modem.
You use CreateFile("COM2",......); // Open you modem COM port
Then, use the WriteFile command to send ->AT Commands<- to your modem.
By exemple you could send the string "ATDT 888-8888" to your modem. Don't
forget that a modem has 2 modes. Read your modem userguide for more info.
Once connected, you send you data normally using the WriteFile API (ReadFile
can be used also !)

If you need more help, contact me
Good luck
Emmanuel B. at 2007-11-11 20:52:57 >