#include "windef.h"
#include "winsvc.h"
#include "qmgr.h"
#include "wine/debug.h"
Go to the source code of this file.
◆ ServiceHandler()
Definition at line 57 of file service.c.
58{
62 TRACE(
"shutting down service\n");
65 break;
66 default:
67 FIXME(
"ignoring handle service ctrl %x\n",
ctrl);
69 break;
70 }
71
73}
static VOID UpdateStatus(DWORD dwCurrentState, DWORD dwWin32ExitCode, DWORD dwWaitHint)
BOOL WINAPI DECLSPEC_HOTPATCH SetEvent(IN HANDLE hEvent)
#define SERVICE_STOP_PENDING
#define SERVICE_CONTROL_SHUTDOWN
#define SERVICE_CONTROL_STOP
Referenced by InitIdtVector(), and ServiceMain().
◆ ServiceMain()
Definition at line 105 of file service.c.
106{
108 static const WCHAR qmgr_nameW[] = {
'B',
'I',
'T',
'S',0};
111
114 ERR(
"failed to create stop_event\n");
115 return;
116 }
117
121 return;
122 }
123
126 ERR(
"failed starting service thread\n");
128 return;
129 }
130
135 return;
136 }
137
139 if (!fileTxThread)
140 {
141 ERR(
"Failed starting file transfer thread\n");
143 return;
144 }
145
147
151 TRACE(
"service stopped\n");
152
154}
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)
void WINAPI DECLSPEC_HOTPATCH CoUninitialize(void)
DWORD WINAPI fileTransfer(void *param)
BackgroundCopyManagerImpl globalMgr
static BOOL StartCount(void)
static SERVICE_STATUS_HANDLE status_handle
static DWORD WINAPI ServiceHandler(DWORD ctrl, DWORD event_type, LPVOID event_data, LPVOID context)
SERVICE_STATUS_HANDLE WINAPI RegisterServiceCtrlHandlerExW(LPCWSTR lpServiceName, LPHANDLER_FUNCTION_EX lpHandlerProc, LPVOID lpContext)
DWORD WINAPI WaitForSingleObject(IN HANDLE hHandle, IN DWORD dwMilliseconds)
HANDLE WINAPI DECLSPEC_HOTPATCH CreateEventW(IN LPSECURITY_ATTRIBUTES lpEventAttributes OPTIONAL, IN BOOL bManualReset, IN BOOL bInitialState, IN LPCWSTR lpName OPTIONAL)
DWORD WINAPI GetLastError(void)
#define SERVICE_START_PENDING
◆ StartCount()
Definition at line 77 of file service.c.
78{
81
83
87
93
99
101}
HRESULT WINAPI CoRegisterClassObject(REFCLSID rclsid, LPUNKNOWN pUnk, DWORD dwClsContext, DWORD flags, LPDWORD lpdwRegister)
HRESULT WINAPI DECLSPEC_HOTPATCH CoInitializeEx(LPVOID lpReserved, DWORD dwCoInit)
HRESULT WINAPI CoInitializeSecurity(PSECURITY_DESCRIPTOR pSecDesc, LONG cAuthSvc, SOLE_AUTHENTICATION_SERVICE *asAuthSvc, void *pReserved1, DWORD dwAuthnLevel, DWORD dwImpLevel, void *pReserved2, DWORD dwCapabilities, void *pReserved3)
ClassFactoryImpl BITS_ClassFactory
#define RPC_C_AUTHN_LEVEL_NONE
#define RPC_C_IMP_LEVEL_IMPERSONATE
IClassFactory IClassFactory_iface
Referenced by ServiceMain().
◆ UpdateStatus()
Definition at line 34 of file service.c.
35{
37 status.dwCurrentState = dwCurrentState;
39 status.dwControlsAccepted = 0;
40 else
44 status.dwWin32ExitCode = 0;
45 status.dwServiceSpecificExitCode = 0;
47 status.dwWaitHint = dwWaitHint;
48
50 ERR(
"failed to set service status\n");
52 }
53}
BOOL WINAPI SetServiceStatus(SERVICE_STATUS_HANDLE hServiceStatus, LPSERVICE_STATUS lpServiceStatus)
#define SERVICE_ACCEPT_STOP
#define SERVICE_ACCEPT_PAUSE_CONTINUE
#define SERVICE_ACCEPT_SHUTDOWN
#define SERVICE_WIN32_OWN_PROCESS
Referenced by ServiceHandler(), and ServiceMain().
◆ WINE_DEFAULT_DEBUG_CHANNEL()
WINE_DEFAULT_DEBUG_CHANNEL |
( |
qmgr |
| ) |
|
◆ status
◆ status_handle
◆ stop_event