/*++ Copyright (c) 1998 Microsoft Corporation Module Name : wprecycler.cxx Abstract: Implementation of WP_RECYCLER. Object handles worker process recycling - Memory based recycling - Schedule based recycling - Elapsed Time based recycling - Processed Request Count based recycling Dependencies: g_pwpContext is used by WP_RECYCLER to be able to send messages Author: Jaroslav Dunajsky (JaroslaD) 07-Dec-2000 Environment: Win32 - User Mode Project: W3DT.DLL --*/ #include "precomp.hxx" #include "wprecycler.hxx" #define ONE_DAY_IN_MILLISECONDS (1000 * 60 * 60 * 24) // // Static variables // CRITICAL_SECTION WP_RECYCLER::sm_CritSec; // // Static variables for Memory based recycling // HANDLE WP_RECYCLER::sm_hTimerForMemoryBased = NULL; BOOL WP_RECYCLER::sm_fIsStartedMemoryBased = FALSE; SIZE_T WP_RECYCLER::sm_MaxValueForMemoryBased = 0; HANDLE WP_RECYCLER::sm_hCurrentProcess = NULL; // // Static variables for Time based recycling // HANDLE WP_RECYCLER::sm_hTimerForTimeBased = NULL; BOOL WP_RECYCLER::sm_fIsStartedTimeBased = FALSE; // // Static variables for Schedule based recycling // HANDLE WP_RECYCLER::sm_hTimerQueueForScheduleBased = NULL; BOOL WP_RECYCLER::sm_fIsStartedScheduleBased = FALSE; // // Static variables for Request based recycling // BOOL WP_RECYCLER::sm_fIsStartedRequestBased = FALSE; DWORD WP_RECYCLER::sm_dwMaxValueForRequestBased = 0; LONG WP_RECYCLER::sm_RecyclingMsgSent = 0; BOOL WP_RECYCLER::sm_fCritSecInit = FALSE; // // Static methods for Schedule based recycling // //static HRESULT WP_RECYCLER::StartScheduleBased( IN const WCHAR * pwszScheduleTimes ) /*++ Routine Description: Start schedule based recycling Arguments: pwszScheduleTimes - MULTISZ array of time information