BUG: Garbage in Input Buffer When InBufferSize > 2048

Last reviewed: April 4, 1996
Article ID: Q149279
The information in this article applies to:
  • Standard, Professional, and Enterprise Editions of Microsoft Visual Basic, 16-bit and 32-bit, for Windows, version 4.0

SYMPTOMS

Using the MSCOMM control, the contents of the input buffer may be corrupted when read by an application. This problem can occur if the InBufferSize property is greater than 2048 bytes and if the ParityReplace property holds some value other than an empty string ("").

MORE INFORMATION

Due to a problem with the Windows 3.x and Windows 95 operating systems and a resulting conflict with the MSCOMM control, when parity checking is enabled, characters in the input buffer can be corrupted. The character specified in the ParityReplace property ends up replacing characters in the input buffer. For example, if ParityReplace is set to "?" (the default), then:

   "Hello VB World" might be replaced by "He?l?o V??W?rld"

In this case, the problem is actually not with the MSCOMM control, but rather with Win3.x and Win95 operating systems. The problem does not occur on Windows NT.

WORKAROUND

To avoid this problem, reduce the value of the InBufferSize property to something less than 2048 bytes. Alternatively, the ParityReplace property can be set to "", an empty string. This will disable all parity checking and remove the problem. In addition, because Windows NT does not have this problem, utilizing NT instead of Windows 95 or Windows 3.x may also be an option.

STATUS

Microsoft has confirmed this to be an issue in the Microsoft products listed at the beginning of this article. Microsoft is researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.


Additional reference words: 4.00 vb4win vb4all
KBCategory: kbprg kbbuglist
KBSubcategory: PrgCtrlsCus




THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: April 4, 1996
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.