You may lose data unexpectedly when you debug the Input property of the MSComm control in Visual Studio .NET (327362)



The information in this article applies to:

  • Microsoft Visual Studio .NET (2003), Professional Edition
  • Microsoft Visual Studio .NET (2003), Enterprise Architect Edition
  • Microsoft Visual Studio .NET (2003), Enterprise Developer Edition
  • Microsoft Visual Studio .NET (2003), Academic Edition
  • Microsoft Visual Studio .NET (2002), Professional Edition
  • Microsoft Visual Studio .NET (2002), Enterprise Architect Edition
  • Microsoft Visual Studio .NET (2002), Enterprise Developer Edition
  • Microsoft Visual Studio .NET (2002), Academic Edition

This article was previously published under Q327362

SUMMARY

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.

MORE INFORMATION

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.

REFERENCES

For additional information, visit the following Microsoft Developer Network (MSDN) Web sites:

Modification Type:MinorLast Reviewed:3/3/2006
Keywords:kbvs2005swept kbvs2005doesnotapply kbhowto kbInput kbCtrl kbProperties kbDebug kbinfo KB327362 kbAudDeveloper