Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. COM Port Problem

COM Port Problem

Scheduled Pinned Locked Moved The Lounge
helpcom
7 Posts 5 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Sandeep Shetty
    wrote on last edited by
    #1

    Hello!! I am trying to send and receive some data using COMM(communications ). I have got the handle to COM port(COM port1) by the use of lineGetID() ( using VARSTRING datastructure). I have only modified the timeout value (commtimeouts.ReadIntervalTimeout = 3000; and set the others to zero).. When I transmit the data from the client it gives error in the client saying ERROR_ALREADY_EXISTS (0x000000b7).. When I try to open the COM port by using CreateFile() it gives error "Access Denied". Could you please advise what could be the problem... Sandeep :confused: :confused:

    M N M 3 Replies Last reply
    0
    • S Sandeep Shetty

      Hello!! I am trying to send and receive some data using COMM(communications ). I have got the handle to COM port(COM port1) by the use of lineGetID() ( using VARSTRING datastructure). I have only modified the timeout value (commtimeouts.ReadIntervalTimeout = 3000; and set the others to zero).. When I transmit the data from the client it gives error in the client saying ERROR_ALREADY_EXISTS (0x000000b7).. When I try to open the COM port by using CreateFile() it gives error "Access Denied". Could you please advise what could be the problem... Sandeep :confused: :confused:

      M Offline
      M Offline
      Matt W
      wrote on last edited by
      #2

      Perhaps you would get an answer more promptly if you posted this to the C++ forum. (or whatever language it is that you are using...it looks like cpp!) :confused: Matt ------ Accept that some days you are the pigeon and some days the statue.

      1 Reply Last reply
      0
      • S Sandeep Shetty

        Hello!! I am trying to send and receive some data using COMM(communications ). I have got the handle to COM port(COM port1) by the use of lineGetID() ( using VARSTRING datastructure). I have only modified the timeout value (commtimeouts.ReadIntervalTimeout = 3000; and set the others to zero).. When I transmit the data from the client it gives error in the client saying ERROR_ALREADY_EXISTS (0x000000b7).. When I try to open the COM port by using CreateFile() it gives error "Access Denied". Could you please advise what could be the problem... Sandeep :confused: :confused:

        N Offline
        N Offline
        NormDroid
        wrote on last edited by
        #3

        :| Typical you can't wait 2 seconds before your get a reply from the relevent forum so you try the lounge - you'll never get this answered if you don't give enough details. Anyway, from your rather terse problem, lineGetID indicates your using TAPI and CreateFile indicates you've also tried Win32. From that I can assume your using CreateFile with the correct parameters? If you are then it seems to me that the COM port is already open by another process. You can test this quite simply by using HyperTerm and trying to open the COM port direct, if this fails then another process has aquired the port. Any remember young Jedi "use the correct forum". O-B-1 KaNormi

        M 1 Reply Last reply
        0
        • N NormDroid

          :| Typical you can't wait 2 seconds before your get a reply from the relevent forum so you try the lounge - you'll never get this answered if you don't give enough details. Anyway, from your rather terse problem, lineGetID indicates your using TAPI and CreateFile indicates you've also tried Win32. From that I can assume your using CreateFile with the correct parameters? If you are then it seems to me that the COM port is already open by another process. You can test this quite simply by using HyperTerm and trying to open the COM port direct, if this fails then another process has aquired the port. Any remember young Jedi "use the correct forum". O-B-1 KaNormi

          M Offline
          M Offline
          Matt Philmon
          wrote on last edited by
          #4

          And remember that applications like HotSync for Palm tie up the COM port in just this way.

          1 Reply Last reply
          0
          • S Sandeep Shetty

            Hello!! I am trying to send and receive some data using COMM(communications ). I have got the handle to COM port(COM port1) by the use of lineGetID() ( using VARSTRING datastructure). I have only modified the timeout value (commtimeouts.ReadIntervalTimeout = 3000; and set the others to zero).. When I transmit the data from the client it gives error in the client saying ERROR_ALREADY_EXISTS (0x000000b7).. When I try to open the COM port by using CreateFile() it gives error "Access Denied". Could you please advise what could be the problem... Sandeep :confused: :confused:

            M Offline
            M Offline
            Mike Sax
            wrote on last edited by
            #5

            The handle that was opened by TAPI uses Overlapped I/O. You may want to check out the TAPICOM sample on the MSDN site, or save yourself a bunch of trouble and get a third-party component library.


            Mike Sax http://Sax.net Rock Solid Components™

            N 1 Reply Last reply
            0
            • M Mike Sax

              The handle that was opened by TAPI uses Overlapped I/O. You may want to check out the TAPICOM sample on the MSDN site, or save yourself a bunch of trouble and get a third-party component library.


              Mike Sax http://Sax.net Rock Solid Components™

              N Offline
              N Offline
              NormDroid
              wrote on last edited by
              #6

              Nice marketing angle Mike Errrm do Sax do a TAPI component by any chance ;) Norm

              M 1 Reply Last reply
              0
              • N NormDroid

                Nice marketing angle Mike Errrm do Sax do a TAPI component by any chance ;) Norm

                M Offline
                M Offline
                Mike Sax
                wrote on last edited by
                #7

                Well, I resisted the temptation to provide a link to download the product or even mention its name. And I offered some technical advice and a pointer to a free sample. And I do very honestly and strongly believe that writing TAPI code is something you should try to avoid because it's one of the less well designed APIs in Windows [understatement of the year]. So to answer your question... yes! :-D


                Mike Sax http://Sax.net Rock Solid Components™

                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • World
                • Users
                • Groups