Microsoft KB Archive/90911

= FIX: CodeView Version 4.0 Redirects STDPRN to the Screen =

Article ID: 90911

Article Last Modified on 9/30/2003

-

APPLIES TO


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

-



This article was previously published under Q90911



SYMPTOMS
When version 4.0, 4.01, or 4.05 of CodeView for MS-DOS is used to debug an application that sends output to STDPRN, the output is redirected to the screen.



RESOLUTION
Reopen STDPRN to the PRN device. The sample code below demonstrates the steps involved.



STATUS
Microsoft has confirmed this to be a problem in CodeView versions 4.0, 4.01, and 4.05. This problem was corrected in CodeView version 4.1.



Sample Code
/* Compile options needed: /Od /Zi (/D_DEBUG to work around problem)


 * 1) include 

void main(void) {   fprintf(stdprn, &quot;When running under CV 4.0, this &quot;                    &quot;is sent to the screen.\n&quot;);

freopen(&quot;PRN&quot;, &quot;wb&quot;, stdprn);
 * 1) ifdef _DEBUG

fprintf(stdprn, &quot;When running under CV 4.0, this &quot;                   &quot;is sent to the printer.\n&quot;);
 * 1) endif

}

Additional query words: 4.00 4.01 4.05

Keywords: kbfix kb16bitonly KB90911

-

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

© Microsoft Corporation. All rights reserved.