Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Porting modem app from Windows 98 to Windows 2000

Status
Not open for further replies.

adrumea

Programmer
Aug 21, 2003
2
0
0
RO
I'm porting a modem application from Windows 98 to Windows 2000. The application uses a modem to connect to another device using a phone line. The problem i encountered is that on Windows 2000, the exact same communication code used on Windows 98 fails. Before jumping to conclusions, rest assured that i've double checked the comm port initialization (it's an external modem) and the modem gets the right commands and correctly dials the number. Still, when it gets to sending some bytes of data to the device at the other end of the phone line (also kind of modem, obviously), it fails to do so. Somebody suggested this might be a timing issue (the device must get a reply in a short period of time, around 200ms), but i've logged the data packets and their delays fall within the specs. The speed i'm using is 300 bauds and i'm transmitting/receiving only a few bytes (at most 10 bytes at times). Has anybody encountered a similar problem? Could this be a timing problem but at a lower level? (maybe some serial driver internal delays i'm not aware) Please suggest any workarounds, because i'm out of ideeas. Thanks in advance for any help!
 
I had the same problem porting some Win98 code to NT years ago. For me it was rather simple. The Win98 MSComm control would append a line feed, but the NT control didn't. It was a simple matter of replacing all of the vbCR constants with vbCRLF.

Give it a try and drop another message if it doesn't work out.


pansophic
 
The problem appears *after* the modem has dialed and established a connection to the device. After establihing a connection, i assume that any bytes you send are delivered immediately through the phone line and the modem doesn't need an CR or LF or CR+LF. Am i wrong? Also, i'm not using MSComm, instead i'm using Windows API directly (CreateFile, ReadFile, WriteFile). Any other thoughts?
 
Sorry about the delay. I have all of my serial references at home.

I assume that you are using a DCB structure?

The only reference that I could find to any difference between the two OSs is for direct port access, rather than using the API. NT requires a kernel mode driver, while 98 does not.

I know that there are differences in the Win32API on 98 and the Win32API on NT, but I've never seen any documentation that clearly delineated what those are. And all of the references that I have that talk about using the API for serial port access claim to work on both platforms.

Sorry I can't be of more help.


pansophic
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top