Microsoft KB Archive/116462

= BUG: Screen Corruption Can Occur with _setvideomode =

Article ID: 116462

Article Last Modified on 9/30/2003

-

APPLIES TO


 * Microsoft CodeView 4.0
 * Microsoft CodeView 4.01
 * Microsoft CodeView 4.1

-



This article was previously published under Q116462



SYMPTOMS
When the CodeView video mode is set to be the same as the current MS-DOS video mode, calls to _setvideomode(_DEFAULTMODE) can cause screen corruption.



RESOLUTION
To work around the problem, start CodeView in a different mode than the one MS-DOS is using.



STATUS
Microsoft has confirmed this to be a bug with CodeView for MS-DOS. We are researching this problem and will post new information in the Microsoft Knowledge Base as it becomes available.



MORE INFORMATION
The sample code below demonstrates the problem. Build a debug version and follow these steps:  Install the ANSI.SYS driver. If ANSI.SYS is not already installed, you have to reboot your computer to install it. To install ANSI.SYS, add the following line to your CONFIG.SYS file:

DEVICE=C:\DOS\ANSI.SYS

 Enter mode co80, 50 at the MS-DOS prompt. Enter CV /50 VIDEO to debug the VIDEO.EXE file in CodeView. Type t3 in the CodeView command window.

There should now be a green border around the whole screen that does not go away when you exit CodeView. You may also experience a certain amount of text loss in the CodeView windows.

NOTE: Reissuing the mode command with different mode values at the MS-DOS prompt restores the screen.

In step 2 above, using CV /43 video or CV /25 video prevents this problem from occurring.

Sample Code
/* Compile options needed: Zi /Od

/* VIDEO.C */

#include 

void main(void) {   _setvideomode(_DEFAULTMODE); }

Additional query words: 4.00 4.10

Keywords: kb16bitonly KB116462

-

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

© Microsoft Corporation. All rights reserved.