BUG: Access Violation in BuildCommDCB

ID: Q201372


The information in this article applies to:


SYMPTOMS

An access violation occurs during a call to BuildCommDCB.


CAUSE

In Windows 95 and 98, 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 kbCommBand kbKernBase kbGrpKernBase 
Version           : winnt:
Platform          : winnt 
Issue type        : kbbug 

Last Reviewed: April 11, 1999