GIDForums  

Go Back   GIDForums > Computer Programming Forums > C++ Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 08-Jun-2009, 09:19
calvinlyp calvinlyp is offline
New Member
 
Join Date: Jun 2009
Posts: 11
calvinlyp is on a distinguished road

Running a C++ program to invoke hyperterminal


hi all,

i am relatively new to c++ programming.

would like to ask is it possible to write a program to invoke the hyper terminal?

in the sense the program will allow user to enter phone number(maybe plus some others parameters like data bits,baud rate) before it invoke hyperterminal?

plus can the program also input command to the hyperterminal which is connected to a modem to do some function?

pls help.
thanks.
  #2  
Old 09-Jun-2009, 03:35
Mexican Bob's Avatar
Mexican Bob Mexican Bob is offline
Regular Member
 
Join Date: Mar 2008
Location: Chicxulub, Yucatán
Posts: 335
Mexican Bob is a jewel in the roughMexican Bob is a jewel in the roughMexican Bob is a jewel in the roughMexican Bob is a jewel in the rough

Re: Running a C++ program to invoke hyperterminal


Yes. It is possible. It is not overtly simple. In order to invoke Hyperterminal (a piece of junk, as terminal emulators go) you would:

CPP / C++ / C Code:
system("hypertrm.exe");

In order to pass HT parameters, you would want to check to see if it takes commandline arguments, which I don't know and I don't have it on my Macbook, so I couldn't test it or tell you.

However, you could create and save a configuration file and then look at the contents of it so that you could produce your own configuration file and then invoke HT with the configuration file as a startup parameter, I think.

To send a running instance of HT some "commands," you would use FindWindow and SendMessage or PostMessage.

Better might be to simply control the UART yourself using Win32 directly. It involves a lot more coding, but you have much more granular control over what you want to do.

Perhaps better still would be to find/download a better terminal emulator that has a better API for programmer's use. There are freely available, open source terminal emulators such as Tera Term and modify the source code directly.

You could easily hack it to create a server socket that listens on a particular port and then performs the desired commands sent from your application.

There isn't much that you can't do with C++. It is incredibly powerful. However, with great power comes great responsibility.
 
 

Recent GIDBlogNot selected for officer school by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Equation solver RazoR C Programming Language 3 18-May-2008 09:24
Two-Tier data dissemination code installation problem nidhibansal1984 Computer Software Forum - Linux 6 16-Sep-2007 10:13
Question regarding EditBox control! gopikomanduri MS Visual C++ / MFC Forum 0 12-Jun-2007 06:10
How to know when some program is running. stormlab C++ Forum 2 11-Oct-2005 08:15

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 23:08.


vBulletin, Copyright © 2000 - 2010, Jelsoft Enterprises Ltd.