CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 1999
    Location
    Finland,Vaasa
    Posts
    7

    Can I use several MsComm controls simultaneous?

    I have 2 MsComm controls, I’m using the first to read serial data from an instrument and when I try to open a second MsComm the first MsComm hangs but the second continues?!

    Any Thoughts...

    Best Regard Toby



  2. #2
    Join Date
    Jul 1999
    Location
    Athens, Hellas
    Posts
    769

    Re: Can I use several MsComm controls simultaneous?

    Every MSComm control that you use, corresponds to one serial port. If you plan to have access to more than one serial ports to your application, you must use more than one MSComm controls.
    Finally, you can change the address of the port from control panel of Windows.
    I don't know if i answered your question, but i want to tell you also that if you plan to make your pc doing two works at the same time and to avoid not responding, you must include the command DoEvents inside the first loop.

    Michael Vlastos
    Company MODUS SA
    Development Department
    Athens, Greece
    Tel: +3-01-9414900

  3. #3
    Join Date
    Jun 1999
    Posts
    8

    Re: Can I use several MsComm controls simultaneous?

    Mscomm control is used for serial data communication. if you are using two mscomm control
    assign different ports for it.

    for example you want to read from a device and write to other simulataneously, use two mscomm control and assign different ports(say com1 to device1 and com2 to device2) ( since devices are connected via serial port to the computer).
    If your process is not a simultanous one, you can use the same port.

    regards
    sujatha


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured