Microsoft KB Archive/149279

= FIX: Garbage in Input Buffer When InBufferSize > 2048 =

Article ID: 149279

Article Last Modified on 7/15/2004

-

APPLIES TO


 * Microsoft Visual Basic 4.0 Standard Edition
 * Microsoft Visual Basic 4.0 Professional Edition
 * Microsoft Visual Basic 4.0 Professional Edition
 * Microsoft Visual Basic 4.0 16-bit Enterprise Edition
 * Microsoft Visual Basic 4.0 32-Bit Enterprise Edition

-



This article was previously published under Q149279



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 ("").



RESOLUTION
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. This problem has been fixed in Microsoft Windows 98.



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.

Keywords: kbbug kbfix kboswin98fix KB149279

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.