?
Solved

Routine accessing com port & logging

Posted on 1998-10-23
5
Medium Priority
?
221 Views
Last Modified: 2013-11-15
I am VERY new to C++, but I have had a request to design a program, and I
think it is beyond me.

"A project with a no timetable is starting and now (in the beginning) at the
design time, is the best time to involve you
1)  I need a routine that will open a windows Comm port,
read that data entering through it then pass it to a windows handler.

2) Using a Windows Message to tickle a list of users logged into the
(in-house) Server cause the Node to activate a local(node station) program
bringing a (current window) that is hidden, up-front and in your face.
Maybe even play a WAV file to-boot."

Do you have any suggestion on books or examples that may be helpful. ANYTHING would be much appreciated. I not sure if I should even attempt this at my level, but I am itching to try!

Thank you for you input.
P.S. What is the basic difference (in learning and appllying) between C++ & VC++?
Bob
0
Comment
Question by:thenovice
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 

Author Comment

by:thenovice
ID: 1175910
Edited text of question
0
 

Author Comment

by:thenovice
ID: 1175911
Edited text of question
0
 
LVL 22

Expert Comment

by:nietod
ID: 1175912
The windows API CreateFile() can be used to open the COM port.  Then you can use ReadFile() to read from it.

I don't know how to communicate with other workstations on a network.  so i can't help you with the 2nd part.

 What is the basic difference (in learning and appllying) between C++ & VC++?
VC++ is not a language or anything.  It is a C++ compiler.  I compiles ordinary C++ programs.  I has a GUI user interface that allows you create parts of the program quickly.  Like a class wizzard that can start a class for you, but you still need to write the real C++ code.  It has a class viewer that looks at your C++ code and shows you your classes graphically.  But it still is just a C++  compiler and some tools for making working in C++ easier--but it is still 100% C++.
0
 

Expert Comment

by:lestat007
ID: 1175913
The following suggestion assumes you are using a windows 95/NT environment on both the client and server.

You say that users are going to log into this server via a serial port.  If you're going to be doing any type of client/server application you should use a socket instead of just a serial port.  The reason why is that if these clients and server machines are going to be in close proximity, then you should be using an Ethernet card instead of a serial port.  That way you could simply open an asynchronous socket to the client.

On the other hand, if your client and server are not in close proximity (now or in the future) and you have to communicate through the serial port over a modem, you might as well use the Internet.  That way you could still use the same asynchronous socket code mentioned above.  Of course, in order to access the Internet you'll need an ISP.

Check out the MFC class CAsyncSocket.

The reason why I say this is that the days of direct low level serial port communications is dead.  No one uses it directly any more.

I suggest you do it the right way and open a socket.  It's a lot easier than opening the serial port.
0
 

Accepted Solution

by:
Mathy120398 earned 150 total points
ID: 1175914
I would suggest looking into purchasing a serial communications library.  I have used one made by Greenleaf Software called CommLib.  It is compatible with all kinds of C/C++ compilers and all kinds of operating systems.  Check it out.  Their web site is www.greenleafsoftware.com.  Hope this helps.
0

Featured Post

Moving data to the cloud? Find out if you’re ready

Before moving to the cloud, it is important to carefully define your db needs, plan for the migration & understand prod. environment. This wp explains how to define what you need from a cloud provider, plan for the migration & what putting a cloud solution into practice entails.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are many software programs on offer that will claim to magically speed up your computer. The best advice I can give you is to avoid them like the plague, because they will often cause far more problems than they solve. Try some of these "do it…
Invest in your employees with these five simple steps to improve employee engagement and retention.
The viewer will learn how to successfully create a multiboot device using the SARDU utility on Windows 7. Start the SARDU utility: Change the image directory to wherever you store your ISOs, this will prevent you from having 2 copies of an ISO wit…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question