???? ID: 293215 - ????? ???????: 02 ?????? 2010 - ??????: 2.0

???? ????-?????? ????? ???? ?? ?? ?? ?? ???? ????????? ?? ????? ??? trimmed ??

?????? ??????This article applies to a different operating system than the one you are using. Article content that may not be relevant to you is disabled.

?? ????? ??

??? ?? ??????? ???? | ??? ?? ??????? ????

?????

?? ??? ????????? ?????-???? ?? ????? ?? ?????? ?? ???? ?????? ????command ?? ?????????????? ?? ?? ????? ???? ???????? ???????, ???????? ?????? ????????? ?? ??? ??????? ??? ????? ?????? ?? ???????? ??????????? ?? ??? RAM ?? ????? ???? ?? ??? ???? ??? ??? ????? ?? ??? ??? ??? ?????? ?? ?? trimming ??? ????????? ?? ???? ???????????? poorer ???????? ??????? ???? ?????? ????? RAM ??? faulted ?? ??? ????

???? ???????

??? ???? ??? ????????? ???? ???? ????-?????? ????? ????????? SW_MINIMIZE ???? ?? ??? ShowWindow() API ??? ??????, ????????? ?? ????? ??? trimmed ?? ?????? ???????, ????? ??????? ????????? ????? ?? ????????? ???? ShowWindow() ?? ????? ?? SW_SHOWMINIMIZED ???? ?? ??? trimmed ???? ?? ?????

?? ????????? ?? ????? ??? ?? ????? RAM ??? ????????? ???? ?? ??? ????? ??????? ??? ?????? ??????? ?? ??? ??? ?? ?????? ????? ???? ????? ?? ??????? ??? ???????? ?? ???? ????? ?????? triggering ???? ?? ????? ???? ?? ??? ???? ????????? ?? ??? ?????? ????

?? ????????? ?????? ??? ?? ????? ?? ??? "-1" ?? ??? ?? ??? ?? ??? SetProcessWorkingSetSize() API ??? ?????? ??? ?? ????? ????? ????? ?? ???? ???dwMinimumWorkingSetSize, ??dwMaximumWorkingSetSize????????? ?? ?? essentially ???? ?????? trims ????????? ?? ???? ????-?????? ????? ???? ?? ?? ??? ?? ?? ???? ???? ?? ????????? ?????? ????? ???? ??? ?????? ????? ??? ????? ??? RAM ??? ?????? ???, ?? ??????? ?? ???? ?? ?????? ???????? ??? ??? ??? ?? ???? ?? ?????? ?????? ?????? ?? ??? ??? ???? ??????????? ?? ??? ????? ?? ???? ??? ???? ????? ????????? ???? ?? ?????? ???? trimming ?????????? ?? ????????? ??? ?? ???????????? ????? ???

?? ??? ????? ?? ?????? ?? ???? ?????? ????command ?? ?????????????? ?????? ???????, ????? SC_MINIMIZE ???? ?? ??? ?? WM_SYSCOMMAND ????? ???? ??? ?????? DefWindowProc() ?????? passes ?????? ??????? ????? ????????? ???? ?? ?? ????? ????? ?????????, ??? ??????? ????????? ????? SW_MINIMIZE ???? ?? ??? ?????? ShowWindow() ?????? ????? ?????? ???? ????????, ?? ??? ??? ?? ????????? ??? ?? trimmed ???? ?? ??? ??? ?? ???? ?????

?? ???? ????????? ?? ???? ???? ??????? ??? trimmed ???? ???? ?? ???? ??? ?? ??? ???? ???? ??? ???? ?? ???, ????-?????? ????? ?? ??? ????? ????????? ????? WM_SYSCOMMAND ????? intercept ?? SW_SHOWMINIMIZED ???? ?? ?????? ShowWindow() ?????? SC_MINIMIZE ???? ?? ??? ??????????? ???? ?? SC_MINIMIZE ???? DefWindowProc() ?? ??? ???? ???? ??????

????? ???

????? ??? ????????? ???? ?? ?? ?? ??????? ????? ????????? ?? ?????? ???? ?? ??? ?? trimmed ???? ?? ??? ?? ????????? ?? ????? ?? ??? WM_SYSCOMMAND ????? intercepts ????? ????????? ????? ?? ??? ???? ????:
LRESULT CALLBACK WndProc (HWND hWnd, UINT iMsg, WPARAM wParam, 
      LPARAM lParam) {

   switch (iMsg) {

      case WM_SYSCOMMAND:
         if (wParam == SC_MINIMIZE) {

            // programmatically minimize the window
            ShowWindow(hWnd, SW_SHOWMINIMIZED);

            // do not pass the minimize command on to the system's
            // default window procedure
            return 0;
         }

         // allow other system commands to be passed on to the
         // default window procedure
         break; 

      // handle other window messages here...
      case WM_WHATEVER:
         break;
   }

   return DefWindowProc(hWnd, iMsg, wParam, lParam);
}
				

???? ???? ???? ??:
  • Microsoft Win32 Application Programming Interface
??????: 
kbapi kbkernbase kbmemory kbprb kbmt KB293215 KbMthi
???? ?????? ???????????? ?????? ????????
??????????: ?? ???? ?? ???? ??????? ?? ????? ?? Microsoft ????-?????? ?????????? ?????? ?????? ???? ??? ??. Microsoft ???? ??? ????-???????? ?? ????-???????? ????? ?????? ?? ???? ???????? ???? ?? ???? ????? ????? ??? ?? ??? ?????? ?? ???? ???? ???? ??? ????? ??. ???????, ????-???????? ???? ????? ???? ???? ???? ???. ?????, ????????, ?????-???? ?? ??????? ?? ???????? ?? ???? ???, ???? ?? ??? ?????? ???? ???? ??? ????? ??? ?? ???? ??. Microsoft ??????? ??? ???? ?? ?????? ?? ??????????, ????????? ?? ??? ?????? ?? ???? ????? ?? ???? ???????? ?? ??? ???? ????? ?? ??? ????????? ???? ??. Microsoft ????-?????? ?????????? ?? ????? ?????? ?? ?? ??? ??.
?????????? ?? ??????? ????????? ??????? ??:293215  (http://support.microsoft.com/kb/293215/en-us/ )