a question

This is a discussion on a question within the C++ Programming forums, part of the General Programming Boards category; Hello I want to conect two computer by their serial port, enter data in one and see them in another. ...

  1. #1
    Registered User
    Join Date
    Jun 2003
    Posts
    1

    Question a question

    Hello
    I want to conect two computer by their serial port,
    enter data in one and see them in another.
    I should use C or C++ programing.
    can you tell me how should I do?
    I don't know C & C++ enough ...
    thank you for your help.
    Mahshid

  2. #2
    Banned master5001's Avatar
    Join Date
    Aug 2001
    Location
    Visalia, CA, USA
    Posts
    3,685
    You should be able to do this using fopen(). The first param should be something like "COM1" or whatever port you decide to use, and of course the second param should be the type of access you want (i.e. read, write). If you can't get this to work it will depend on your os.
    Last edited by master5001; 06-30-2003 at 05:53 AM.

  3. #3
    Registered User
    Join Date
    Nov 2001
    Posts
    1,348
    Here is a link to MSDN that shows a good design sample from Microsoft.

    http://msdn.microsoft.com/library/d...msdn_serial.asp

    Kuphryn

  4. #4
    Registered User
    Join Date
    Jun 2003
    Posts
    70
    Ya.....fopen() is right way to open port as file and then read and write through that handle.

    One more important thing : you will have to use NULL MODEM CABLE to connect your two computers through COM port.
    Chintan R Naik

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Alice....
    By Lurker in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 06-20-2005, 03:51 PM
  2. Debugging question
    By o_0 in forum C Programming
    Replies: 9
    Last Post: 10-10-2004, 06:51 PM
  3. Question about pointers #2
    By maxhavoc in forum C++ Programming
    Replies: 28
    Last Post: 06-21-2004, 01:52 PM
  4. Question...
    By TechWins in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 07-28-2003, 10:47 PM
  5. Question, question!
    By oskilian in forum A Brief History of Cprogramming.com
    Replies: 5
    Last Post: 12-24-2001, 01:47 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21