20{
22 SC_HANDLE hService;
29
34
38 if (!hService)
39 {
42 return dwResult;
43 }
44
45 if (hProgress)
46 {
47
49 }
50
51
54
55
59 {
60 if (hProgress)
61 {
62
64 }
65
67 {
69
71
72 if (WaitTime < 1000) WaitTime = 1000;
73 else if (WaitTime > 10000) WaitTime = 10000;
74
75
76 for (
i = WaitTime / 1000;
i > 0;
i--)
77 {
79 if (hProgress)
80 {
81
83 }
84 }
85
90 &BytesNeeded))
91 {
92
94 {
95
98 break;
99 }
100 }
101 else
102 {
104 DPRINT1(
"QueryServiceStatusEx failed: %d\n", dwResult);
105 }
106 }
107
108
110 {
112 }
113 }
114 else
115 {
117 }
118
121
122 return dwResult;
123}
VOID IncrementProgressBar(HANDLE hProgress, UINT NewPos)
static WCHAR ServiceName[]
static SERVICE_STATUS ServiceStatus
DWORD WINAPI GetTickCount(VOID)
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
SC_HANDLE WINAPI OpenSCManagerW(LPCWSTR lpMachineName, LPCWSTR lpDatabaseName, DWORD dwDesiredAccess)
BOOL WINAPI ControlService(SC_HANDLE hService, DWORD dwControl, LPSERVICE_STATUS lpServiceStatus)
BOOL WINAPI QueryServiceStatusEx(SC_HANDLE hService, SC_STATUS_TYPE InfoLevel, LPBYTE lpBuffer, DWORD cbBufSize, LPDWORD pcbBytesNeeded)
SC_HANDLE WINAPI OpenServiceW(SC_HANDLE hSCManager, LPCWSTR lpServiceName, DWORD dwDesiredAccess)
BOOL WINAPI CloseServiceHandle(SC_HANDLE hSCObject)
VOID WINAPI DECLSPEC_HOTPATCH Sleep(IN DWORD dwMilliseconds)
static LARGE_INTEGER StartTime
DWORD WINAPI GetLastError(void)
#define ERROR_SERVICE_REQUEST_TIMEOUT
#define SERVICE_QUERY_STATUS
#define SC_MANAGER_CONNECT
#define SERVICE_CONTROL_STOP