INFO: ????? ??????? ????? CRT ?? ????? GUI

?????? ????????? ?????? ?????????
???? ???????: 105305 - ??? ???????? ???? ????? ????? ??? ???????.
????? ???? | ?? ????

??????

??????? ??????? ??????? ??? ????? C. ??? printf() ?? ????? GUI ?? ??????? ????? ???? ????. ????? ????? ??????? Win32 ?????? AllocConsole() (API) ???? ??????. ????? setvbuf() ????? CRT ??????? ?????? ???? ???? ????? ?????? ??????.

???? ??? ??????? ??? ?? ????? ??????? GUI ?? ??? ??????? ?? ?? "????? ???????. ??? ???? ?? ???? ??? ??????? ?? ???? ??? ????? ??????? ?? "????? ???????" ?? ?? ???? ????? "?????". ????? ????????? ???????? ?????? ????? ?????? ??? ??? ???????:
   int hCrt;
   FILE *hf;

   AllocConsole();
   hCrt = _open_osfhandle(
             (long) GetStdHandle(STD_OUTPUT_HANDLE),
             _O_TEXT
          );
   hf = _fdopen( hCrt, "w" );
   *stdout = *hf;
   i = setvbuf( stdout, NULL, _IONBF, 0 );
				
????????? ???????? ??? ???? ???? CRT ??? ??????? ??????? ???? ??? ???? ????? ???? ?????? ??????? ????? ??? ???? ?? ??? ???? ??? ??????? ??????? ? ?????? stdout ??? ?????? ????. ????? ??? ??????? ????? ??????? ???? ?????? stdout printf() ? puts() ???. ??????? ??? ??????? stdin ? stderr.

???? ?? ??? ????????? ???????? ?? ???? ????? ????? 0 1 ?2. ?? ???????? ????? ?????? complications ?? ??? ?????? ??? ?? ????? ?? ??????? ??????? ??? ???????/??????? ????? ?? I/O ??? ??????? ???????.

??????? ????

????? ??? ????? ????? GUI ?? "??? ?????"????? ???? ??????? ???????? ??????? ????? STD_INPUT_HANDLE ? STD_OUTPUT_HANDLE STD_ERROR_HANDLE ??? ????"???? ?????? ????? ????" ?????? ????? ????? ???? ??????. ??? ??????? ??? ??????? ???? ??? ????? ??? ????? GUI ?????? AllocConsole(). ????? ????? ?? ??? ??? ??????? GetStdHandle() ???? ????? ????? ???? ????. ??????? ?? CRT ?? ?????? ????? ??????? ??? ??????? ???? ???? ??????? AllocConsole(); ?? ???? ???? ?????? ?? ????? ????? ?????? I/O ??????? 0 1 ?2 ???????? ?????? ???? ?????? ????? ?????? ????? OS ??? ??? ????? ???? I/O CRT ??? ????? OS ??? ???? ??????? CRT ?? ???? ?? ???? ??????. ?????? ???? ?????? ?????? ????? ??? ??? ???????.

?? ???? ???? ??? ????? ??????? GUI ?? ??? ??????? ???? ??? "?????" ? ????? OS ???????? ???? ?????? ??? ??? ???? ????? ?????? ???? ???? ??? ?????? ?? CMD.EXE. ??? ????? ??????? CRT ??? ????? ????? ?????? I/O ??????? 0 1 ?2 ??????? ??????? ??????? ???? ??? ??????? ?? CMD.EXE. ????? ?????? ??????? AllocConsole() ? ?????? ????? ????? ???? ??????? ????? ???? ?????? ???? ?? ??? ???? OS ?????? ??? ????? ?? ????? ???? ????? ?? ???? ???? ?????. ?????? coincidence ? ??? ????? ????? ???? ?????? ???? ??? ???? ???? ??? ????? ?????? ????? OS ???????? initilization ???? ?????? ???? ??????? ??? ???? OS ???????? ?? ??? ????? ???? ???? ???? ???--??? ?????? ?? CMD.EXE. ?????? ??? I/O CRT ???? ?? ??? ??????.

?? ????? ?? ???? ?? ?????? ??? ??????? ??????? CRT ?? ??????? ?? ??? ??????? ????? GUI ?? ??? ??????? ??? ?? ?? ???? ??? ?? ???????? ????????? ?? Windows NT ?? Windows. ?? ????? ????, ?? ????? ???? ???? ??? ????????? ??? ??? ??? ??????? ?? "????? < ???" ??????? ">" ???? ????? ????????? ???? ?? ??? ??? ??? ??????? ?? "??? ???????".

???????

???? ???????: 105305 - ????? ??? ??????: 30/????/1427 - ??????: 4.2
????? ???
  • Microsoft Win32 ????? ????? ???????, ????? ?????? ??:
    • Microsoft Windows NT Advanced Server 3.1
    • Microsoft Windows NT 4.0
    • Microsoft Windows NT 3.51 Service Pack 5
    • Microsoft Windows NT 4.0
    • Microsoft Windows 95
    • Microsoft Windows 98 Standard Edition
    • the operating system: Microsoft Windows 2000
    • Microsoft Windows Millennium Edition
    • the operating system: Microsoft Windows XP
????? ??????: 
kbmt kbconsole kbinfo kbkernbase KB105305 KbMtar
????? ????
???: ??? ????? ??? ?????? ???????? ?????? ????? ???? ????? ?????????? ????? ?? ????????? ?????? ????. ???? ???? ?????????? ???? ?? ???????? ???????? ?????? ????????? ????? ????????? ???????? ????? ???????? ?????? ?? ?????? ??? ?? ???????? ???????? ?? ????? ??????? ?????? ??? ??????? ?????? ??. ?????? ?? ???? ??? ??????? ???????? ????? ?? ???? ????? ?????? ??? ????? ??? ????? ??????? ?? ????? ?? ?????? ??? ??? ??????? ??????? ?? ????? ????? ????? ????? ?????. ?? ????? ???? ?????????? ??????? ??? ????? ?? ??????? ?? ????? ?????? ?? ??? ????? ?? ????? ??????? ?? ???????? ?? ??? ???????. ???? ???? ?????????? ???????? ??? ????? ?????? ??????? ??????
???? ??? ????? ??????? ?????? ??????????105305

????? ???????

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com