???????: ??? ?????? ????? Disappearing

???? ?????? ???? ??????
???? ID: 99115 - ?? ???????? ?? ?????? ??? ?? ?? ???? ???? ???? ??.
??? ?? ??????? ???? | ??? ?? ??????? ????

?? ????? ??

??????

?? ???? ????? ????????? ??????? ???? ?? ?? ?? ???? ??????? ??, ????????? ?????? ???, Windows NT Explorer, ?? ????????????<progname></progname>????????? ???? ?? ????? ????????? ??, ?? ?? ??? ????? ?????? ?? ????? ?????? ?? ???? ???? ????????? ?????? ????, ?? ????? ?????????? ???? ?? ??? ????????? ?? ???? ?????? ?? ????? ????? ?? ??? ??????? ?? ???? ??? Disappearing ?? ?????? ????? ?? ???? ???? ?? ??? ?? approaches ????

???? ???????

???? 1: ??? ????????? ??? ??????? ????? ?? ??? ??, ?? ??????

??? ?? ??? ?????? ????? ??? ?? ??? ?? ???? ?? ????? ???? ?????? ???? ?? ??? ???? ????? ????????? ?? ??????????? ?? ??? ???? ?????? ??? ?? ???? ?? ?? ???? ????? ??? ????????? ??????? ?????? ????? ?? ??? ????????? ?? ??????? ???? ?? ??? ????? ????? ?? ??? ??? ????????? ???? ??? ???????, ?? ??? API (????????? ???????????? ???????) ?? ???? ???? ?? ? ????????? ???? ???? ????? CMD.EXE ?? ????????? ????? ??????? ????? ????? ?? ????? ?? ?? ???? ????? ??, ?? ??? ?? (0,0) ??, ???? ??? ????????? ????? ??? ?? ??? ?????? ????? ??? ?? ??? ???

????? ???

   #include <windows.h>
   #include <stdio.h>
   #include <conio.h>

   CONSOLE_SCREEN_BUFFER_INFO csbi;
   HANDLE hStdOutput;
   BOOL bUsePause;

   void main(void)
   {
      hStdOutput = GetStdHandle(STD_OUTPUT_HANDLE);
      if (!GetConsoleScreenBufferInfo(hStdOutput, &csbi))
      {
         printf("GetConsoleScreenBufferInfo failed: %d\n", GetLastError());
         return;
      }

      // if cursor position is (0,0) then use pause
      bUsePause = ((!csbi.dwCursorPosition.X) &&
                   (!csbi.dwCursorPosition.Y));

      printf("Interesting information to read.\n");
      printf("More interesting information to read.\n");

      // only pause if running in separate console window.
      if (bUsePause)
      {
         int ch;
         printf("\n\tPress any key to exit...\n");
         ch = getch();
      }
   }
				
????? ???: ?? ???? ??? ???? ????? ??? ?????????? ?????? ?????? ??????? (CLS) ?? (?????? ?? ???, [C:\] CLS & <progname>), ?? ??? ??? ????????? ?? ???????? ??????? ????? ?? ????? ????? ???? ?? ???? (0, 0), ????? ????????? ?????, CMD.EXE ?? ????? ???? ?? ????? ????? ?? ??? ??? </progname>

???? 2: cmd. exe ?? ??? ????? ??????? /K

???? ??? ????? ??? ???? ????? ????????? ??????? ???? ?? ????????? ??? ???? ?? ??? ???? ?? ??? ????? ?? ?? ??? ?? ?????? ??? ???? ????????? WinExec(), CreateProcess(), ?? ??? ?? ?? ??? ????? ??? ????? ???? ?????? ????? ?? ???? ???:
cmd /K consoleapp.exe
Consoleapp.exe ?????? ?? ??? ??, ?? ??? /K ????? ?????? ????? ??????? ?? ?? ????? ??? ????????? ?????????? ?? ???? ?? ???? ???exit?????? ????? ?? ??? ???? ?? ??? ???? ???

???

???? ID: 99115 - ????? ???????: 03 ?????? 2010 - ??????: 4.0
???? ???? ???? ??:
  • Microsoft Win32 Application Programming Interface
??????: 
kbconsole kbinfo kbkernbase kbprogramming kbmt KB99115 KbMthi
???? ?????? ????????
??????????: ?? ???? ?? ???? ??????? ?? ????? ?? Microsoft ????-?????? ?????????? ?????? ?????? ???? ??? ??. Microsoft ???? ??? ????-???????? ?? ????-???????? ????? ?????? ?? ???? ???????? ???? ?? ???? ????? ????? ??? ?? ??? ?????? ?? ???? ???? ???? ??? ????? ??. ???????, ????-???????? ???? ????? ???? ???? ???? ???. ?????, ????????, ?????-???? ?? ??????? ?? ???????? ?? ???? ???, ???? ?? ??? ?????? ???? ???? ??? ????? ??? ?? ???? ??. Microsoft ??????? ??? ???? ?? ?????? ?? ??????????, ????????? ?? ??? ?????? ?? ???? ????? ?? ???? ???????? ?? ??? ???? ????? ?? ??? ????????? ???? ??. Microsoft ????-?????? ?????????? ?? ????? ?????? ?? ?? ??? ??.
?????????? ?? ??????? ????????? ??????? ??:99115

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

 

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