81 TRACE(
"ServiceControlHandler()\n");
87 TRACE(
" SERVICE_CONTROL_STOP/SERVICE_CONTROL_SHUTDOWN received\n");
96 TRACE(
" SERVICE_CONTROL_PAUSE received\n");
101 TRACE(
" SERVICE_CONTROL_CONTINUE received\n");
106 TRACE(
" SERVICE_CONTROL_INTERROGATE received\n");
113 TRACE(
" Start Shell control received\n");
117 TRACE(
" Logoff control received\n");
122 TRACE(
" Control %lu received\n", dwControl);
161 ERR(
"Could not create the RPC thread\n");
171 ERR(
"Could not create the stop event\n");
179 ERR(
"Could not create the update event\n");
187 ERR(
"Could not create the timer\n");
200 DWORD dwWait, dwError;
205 TRACE(
"SchedServiceMain()\n");
212 ERR(
"RegisterServiceCtrlHandlerExW() failed! (Error %lu)\n",
GetLastError());
221 ERR(
"Service stopped (dwError: %lu\n", dwError);
233 TRACE(
"Wait for next event!\n");
237 TRACE(
"Stop event signaled!\n");
242 TRACE(
"Update event signaled!\n");
250 TRACE(
"Timeout: Start the next job!\n");
static SERVICE_STATUS_HANDLE(WINAPI *pRegisterServiceCtrlHandlerExA)(LPCSTR
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
DWORD WINAPI RpcThreadRoutine(LPVOID lpParameter)
VOID GetNextJobTimeout(HANDLE hTimer)
RTL_RESOURCE StartListLock
VOID RunCurrentJobs(VOID)
static WCHAR ServiceName[]
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
static DWORD ServiceInit(VOID)
static DWORD WINAPI ServiceControlHandler(DWORD dwControl, DWORD dwEventType, LPVOID lpEventData, LPVOID lpContext)
static VOID UpdateServiceStatus(DWORD dwState)
static SERVICE_STATUS_HANDLE ServiceStatusHandle
static SERVICE_STATUS ServiceStatus
VOID WINAPI SchedServiceMain(DWORD argc, LPTSTR *argv)
#define ERROR_CALL_NOT_IMPLEMENTED
#define DLL_PROCESS_ATTACH
#define DLL_PROCESS_DETACH
BOOL WINAPI DisableThreadLibraryCalls(IN HMODULE hLibModule)
HANDLE WINAPI DECLSPEC_HOTPATCH CreateThread(IN LPSECURITY_ATTRIBUTES lpThreadAttributes, IN DWORD dwStackSize, IN LPTHREAD_START_ROUTINE lpStartAddress, IN LPVOID lpParameter, IN DWORD dwCreationFlags, OUT LPDWORD lpThreadId)
#define InitializeListHead(ListHead)
static IN DWORD IN LPVOID lpvReserved
NTSYSAPI BOOLEAN NTAPI RtlAcquireResourceShared(_In_ PRTL_RESOURCE Resource, _In_ BOOLEAN Wait)
NTSYSAPI VOID NTAPI RtlInitializeResource(_In_ PRTL_RESOURCE Resource)
NTSYSAPI BOOLEAN NTAPI RtlAcquireResourceExclusive(_In_ PRTL_RESOURCE Resource, _In_ BOOLEAN Wait)
NTSYSAPI VOID NTAPI RtlReleaseResource(_In_ PRTL_RESOURCE Resource)
#define UNREFERENCED_PARAMETER(P)
RPC_STATUS WINAPI RpcMgmtStopServerListening(RPC_BINDING_HANDLE Binding)
SERVICE_STATUS_HANDLE WINAPI RegisterServiceCtrlHandlerExW(LPCWSTR lpServiceName, LPHANDLER_FUNCTION_EX lpHandlerProc, LPVOID lpContext)
BOOL WINAPI SetServiceStatus(SERVICE_STATUS_HANDLE hServiceStatus, LPSERVICE_STATUS lpServiceStatus)
DWORD dwServiceSpecificExitCode
DWORD WINAPI WaitForMultipleObjects(IN DWORD nCount, IN CONST HANDLE *lpHandles, IN BOOL bWaitAll, IN DWORD dwMilliseconds)
HANDLE WINAPI CreateWaitableTimerW(IN LPSECURITY_ATTRIBUTES lpTimerAttributes OPTIONAL, IN BOOL bManualReset, IN LPCWSTR lpTimerName OPTIONAL)
BOOL WINAPI DECLSPEC_HOTPATCH SetEvent(IN HANDLE hEvent)
DWORD WINAPI GetLastError(void)
DWORD(WINAPI * LPTHREAD_START_ROUTINE)(LPVOID)
#define SERVICE_ACCEPT_STOP
#define SERVICE_STOP_PENDING
#define SERVICE_CONTROL_SHUTDOWN
#define SERVICE_START_PENDING
#define SERVICE_CONTROL_CONTINUE
#define SERVICE_ACCEPT_PAUSE_CONTINUE
#define SERVICE_CONTROL_STOP
#define SERVICE_ACCEPT_SHUTDOWN
#define SERVICE_PAUSE_PENDING
#define SERVICE_CONTROL_PAUSE
#define SERVICE_CONTROL_INTERROGATE
#define SERVICE_CONTINUE_PENDING
#define SERVICE_WIN32_SHARE_PROCESS