Knowledge Base

BUG: Access Violation in BuildCommDCB

PSS ID Number: 201372

Article Last Modified on 5/12/2003


The information in this article applies to:


This article was previously published under Q201372

SYMPTOMS

An access violation occurs during a call to BuildCommDCB.

CAUSE

In Microsoft Windows 95, Microsoft Windows 98, and Microsoft Windows Millennium Edition (Me) BuildCommDCB makes temporary changes to the DCB string passed in. As a result, the string passed into this API is pointed to a read only section of memory, and an access violation occurs.

RESOLUTION

To work around this problem, copy the string to a temporary memory buffer that has read and write access before calling BuildCommDCB.

STATUS

Microsoft is researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.

MORE INFORMATION

This happens most frequently when a fixed string is passed into this API. Starting with Microsoft Visual C++ version 6.0, all hard coded fixed strings are stored as read only when a binary is loaded into memory. Prior to version 6.0, fixed strings were loaded into a read/write section of memory.

Additional query words: kbDSupport

Keywords: kbAPI kbbug kbCommBand kbKernBase kbnofix KB201372
Technology: kbAudDeveloper kbOSWin95 kbOSWin98 kbOSWinME kbOSWinSearch kbWin32API kbWin32sSearch