Click here to Skip to main content
11,413,648 members (52,178 online)
Click here to Skip to main content

Serial communication for Win32 with modem support

, 13 Feb 2002
Rate this:
Please Sign up or sign in to vote.
Free source code (C++) for WIN32 serial communication. Manages also a modem. Example project provided.

Introduction

Here it is. Finally, I think I've reached the final step in serial communication programmation on Win32. This new version (V2.0) is much more structured than the previous one. I can handle either 1-byte exchange (like a UART) or arrays of byte. The application is 100% event-driven on the user side (the object itself is using one thread). And more important of all, this new version handles also modem specific signals like CD and RI. CD allows you to know if the modem is connected (to the other modem) or if you are in command mode. And RI is the RING Indicator. With this version, you can make whatever you like (like for example implementing PPP or simulating a microcontroller's UART)

Links

Download

I've removed the "non event-driven" version since I believe it is not so useful. Anyway, you can still download the V1.x package here (serial.zip). The version 2 can be downloaded here serial2.zip.

Feedback

I hope that this version will be the ultimate library for the serial port. I hope to receive your comments about it. Since the version 1.x was downloaded more than 4000 times in 8 months, I hope this one will be even better. If you like this software, please let me know, 'cause I like to know what people think of my work.

Bye

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

Share

About the Author

Thierry Schneider
Web Developer
Switzerland Switzerland
No Biography provided

Comments and Discussions

 
QuestionIs it possible to use this library with MFC dialog based sample? Pin
Bill Lee Vn, 6-Feb-15 16:30
memberBill Lee Vn6-Feb-15 16:30 
Jokehy086syi1z Pin
vj73tzst7r, 14-Dec-07 13:48
sussvj73tzst7r14-Dec-07 13:48 
GeneralHELP on "Pin: "DTR_INACTIVE" problem Pin
james luo, 9-Jun-07 9:12
memberjames luo9-Jun-07 9:12 
GeneralRe: HELP on "Pin: "DTR_INACTIVE" problem Pin
Thierry Schneider, 11-Jun-07 20:56
memberThierry Schneider11-Jun-07 20:56 
GeneralRe: HELP on "Pin: "DTR_INACTIVE" problem Pin
james luo, 12-Jun-07 15:38
memberjames luo12-Jun-07 15:38 
QuestionHow can i simulate pcAnyWhere Remote Host? Pin
Ye lai Fang, 18-Apr-07 21:23
memberYe lai Fang18-Apr-07 21:23 
AnswerRe: How can i simulate pcAnyWhere Remote Host? Pin
Thierry Schneider, 20-Apr-07 7:26
memberThierry Schneider20-Apr-07 7:26 
GeneralRe: How can i simulate pcAnyWhere Remote Host? Pin
Ye lai Fang, 22-Apr-07 22:31
memberYe lai Fang22-Apr-07 22:31 
Questionhow can i communicate modem through serial port Pin
Member #3769746, 28-Jan-07 4:28
memberMember #376974628-Jan-07 4:28 
AnswerRe: how can i communicate modem through serial port Pin
Thierry Schneider, 3-Feb-07 22:54
memberThierry Schneider3-Feb-07 22:54 
AnswerRe: how can i communicate modem through serial port Pin
larrykind, 11-Mar-07 7:42
memberlarrykind11-Mar-07 7:42 
GeneralRe: how can i communicate modem through serial port Pin
Luiz Salamon, 18-Mar-07 17:58
memberLuiz Salamon18-Mar-07 17:58 
GeneralOne correction Pin
JJ DBT, 2-Aug-06 11:41
memberJJ DBT2-Aug-06 11:41 
Generalfax Pin
thachvv18, 25-Nov-04 17:06
memberthachvv1825-Nov-04 17:06 
Questionhow can I use this code for two or more ports Pin
GF Hou, 30-Oct-04 5:27
memberGF Hou30-Oct-04 5:27 
QuestionCan I add this source code to an ATL project? Pin
gentleboyzhang, 25-Oct-04 17:37
membergentleboyzhang25-Oct-04 17:37 
AnswerRe: Can I add this source code to an ATL project? Pin
paulains, 7-Dec-04 10:33
memberpaulains7-Dec-04 10:33 
GeneralRe: Can I add this source code to an ATL project? Pin
Rocom, 9-Jun-05 0:58
memberRocom9-Jun-05 0:58 
GeneralPerfect Work! Pin
Cheer J. Chen, 22-Mar-04 18:51
sussCheer J. Chen22-Mar-04 18:51 
QuestionWhat about sending HexData Pin
MessnerEW, 18-Mar-04 4:10
memberMessnerEW18-Mar-04 4:10 
AnswerRe: What about sending HexData Pin
Thierry Schneider, 22-Mar-04 22:19
memberThierry Schneider22-Mar-04 22:19 
GeneralSimple Serial Pin
Ja2Yap, 11-Feb-04 22:09
memberJa2Yap11-Feb-04 22:09 
QuestionSounds useful, but how can caller know the size it would receive? Pin
jason lue, 7-May-03 10:05
memberjason lue7-May-03 10:05 
AnswerRe: Sounds useful, but how can caller know the size it would receive? Pin
thierrydollar, 8-May-03 0:49
memberthierrydollar8-May-03 0:49 
GeneralRe: Sounds useful, but how can caller know the size it would receive? Pin
jason lue, 10-May-03 14:43
sussjason lue10-May-03 14:43 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.150427.2 | Last Updated 14 Feb 2002
Article Copyright 2002 by Thierry Schneider
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid