Advertisement

06.03.2008 at 05:21AM PDT, ID: 23452827
[x]
Attachment Details

Closing a serial port.

Asked by skip564 in C++ Builder, C++ Programming Language, C / C++ / C# Editors and IDEs

Tags: Borland C++ Builder, Windows® Internet Explorer, 7.00.6000.16640

Hi. I've written a program (using Borland C++ Builder), to read in some data from the serial port (COM1)and to be able to send data back out through the port. I use the API CreatFile() to open the port and
CloseHandle(handle) to close the port. I've been using another program on a second computer to send data to my application (running on the first computer) and to receive data from my application. When I open COM1
in my application, the program on the second computer reports as follows:
CTS: ON, DSR: ON, RLSD(CD): ON , which is all fine. The problem seems to be when I close the port.
The report is then... CTS: OFF, DSR: OFF, RLSD(CD): OFF , this is also fine, but then immediately following that, it reports... CTS: ON
I'm not sure if this is correct, but by this report, it appears that the lines are being turned OFF, but then, for some reason, CTS is being switched ON again. I'm a little confused by this, as I would have thought that CloseHandle(handle) would closed everything and freed up the port. Could you tell me what the problem is here please? Many thanks, I.PriceStart Free Trial
[+][-]06.04.2008 at 04:20AM PDT, ID: 21708831

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 7-day free trial to view this Administrative Comment or ask the Experts your question.

 
[+][-]06.04.2008 at 07:03AM PDT, ID: 21710191

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.04.2008 at 08:09AM PDT, ID: 21710872

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]06.16.2008 at 03:59AM PDT, ID: 21792354

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.16.2008 at 04:18AM PDT, ID: 21792435

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: C++ Builder, C++ Programming Language, C / C++ / C# Editors and IDEs
Tags: Borland C++ Builder, Windows® Internet Explorer, 7.00.6000.16640
Sign Up Now!
Solution Provided By: gtokas
Participating Experts: 2
Solution Grade: B
 
 
[+][-]06.25.2008 at 03:36AM PDT, ID: 21864167

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.25.2008 at 04:22AM PDT, ID: 21864344

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.25.2008 at 06:15AM PDT, ID: 21865163

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.25.2008 at 06:16AM PDT, ID: 21865172

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.25.2008 at 06:37AM PDT, ID: 21865410

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 7-day free trial to view this Administrative Comment or ask the Experts your question.

 
[+][-]06.25.2008 at 12:51PM PDT, ID: 21869239

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628