Article ID: 327362 - View products that this article applies to.
This article was previously published under Q327362
When you use the MSComm control in Microsoft Visual Studio .NET or in other development languages, you may experience unexpected loss of data while you debug the Input property of the MSComm control. The Input property is used to return and to delete buffered information.
Note The MSComm control is implemented in the MSComm32.ocx file.
When you debug the application that contains the MSComm control and then you break before the Input property of the MSComm control to read the buffer value with the debugger, the value in the buffer is read and is removed from the buffer. Therefore, after you step through the code that tries to read the buffer, the code will read the buffer value as NULL.
This behavior occurs because the input buffer is designed to read the buffer value only one time. This behavior does not occur when the buffer value is not read while you debug. Because the buffer is designed to be read one time only, the debugger or the program that reads the buffer first clears the data out of the buffer.
For additional information, visit the following Microsoft Developer Network (MSDN) Web sites:
Using the Communications Control
Article ID: 327362 - Last Review: November 26, 2007 - Revision: 1.4