CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: MSCOMM

  1. #1
    Join Date
    May 2001
    Posts
    5

    MSCOMM

    I need to write a simple program to read a text file through the com port. This is to be a one- way transmision through a cable (no errors). Am i better off trying to use the oncomm event, or setting up a loop to keep reading the buffer untill an end of file is recieved?


  2. #2
    Join Date
    Apr 2000
    Posts
    737

    Re: MSCOMM

    the best way is to use the oncomm event, which doesn't "eat" too much CPU time, loop is okay if you don't have other choice.

    But beware, you need to have some escape sequence or key to identify the end of file, else you will be waiting forever for the oncomm event.

    HTH

    cksiow
    http://vblib.virtualave.net - share our codes


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