COM Port Problem
-
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:
-
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:
-
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:
:| 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
-
:| 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
And remember that applications like HotSync for Palm tie up the COM port in just this way.
-
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:
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™
-
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™
-
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™