Microsoft KB Archive/264918

= Rich Edit Control GetLine Function May Return Extra Characters =

Article ID: 264918

Article Last Modified on 2/20/2007

-

APPLIES TO


 * Microsoft Windows 2000 Server
 * Microsoft Windows 2000 Advanced Server
 * Microsoft Windows 2000 Professional Edition

-



This article was previously published under Q264918



SYMPTOMS
When the GetLine function of the Rich Edit control is called, there may be extra characters at the end of the returned string.



CAUSE
The return value for GetLine contains the number of characters returned. However, there may be more characters present in the return buffer. The resulting string in the return buffer may not be null-terminated, causing extra characters to appear at the end of the string. This also applies when you send the EM_GETLINE window message.



RESOLUTION
A supported fix is now available from Microsoft, but it is only intended to correct the problem that is described in this article. Apply it only to computers that are experiencing this specific problem. This fix may receive additional testing. Therefore, if you are not severely affected by this problem, Microsoft recommends that you wait for the next Windows 2000 service pack that contains this hotfix.

To resolve this problem immediately, contact Microsoft Product Support Services to obtain the fix. For a complete list of Microsoft Product Support Services phone numbers and information about support costs, visit the following Microsoft Web site:

http://support.microsoft.com/default.aspx?scid=fh;EN-US;CNTACTMS

NOTE: In special cases, charges that are ordinarily incurred for support calls may be canceled if a Microsoft Support Professional determines that a specific update will resolve your problem. The typical support costs will apply to additional support questions and issues that do not qualify for the specific update in question.

The English version of this fix should have the following file attributes or later:   Date      Time    Version       Size     File name -  06/02/00  05:52p  5.30.23.1204  411,920  Riched20.dll



WORKAROUND
This problem does not occur if the GetLine function is called with a string buffer that is initialized with null characters.



STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.



MORE INFORMATION
For additional information about how to install Windows 2000 and Windows 2000 hotfixes at the same time, click the article number below to view the article in the Microsoft Knowledge Base:

249149 Installing Microsoft Windows 2000 and Windows 2000 Hotfixes

Keywords: kbhotfixserver kbqfe kbbug kbfix kbqfe kbwin2000presp2fix KB264918

-

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

© Microsoft Corporation. All rights reserved.