73 lpServiceInfo->lpServiceName = ServiceArgs[0];
79 if (!
lstrcmpi(ServiceArgs[ArgIndex],
_T(
"type=")))
94 else if (!
lstrcmpi(ServiceArgs[ArgIndex],
_T(
"start=")))
106 else if (!
lstrcmpi(ServiceArgs[ArgIndex],
_T(
"error=")))
118 else if (!
lstrcmpi(ServiceArgs[ArgIndex],
_T(
"tag=")))
130 else if (!
lstrcmpi(ServiceArgs[ArgIndex],
_T(
"binpath=")))
132 lpServiceInfo->lpBinaryPathName = ServiceArgs[ArgIndex + 1];
134 else if (!
lstrcmpi(ServiceArgs[ArgIndex],
_T(
"group=")))
136 lpServiceInfo->lpLoadOrderGroup = ServiceArgs[ArgIndex + 1];
138 else if (!
lstrcmpi(ServiceArgs[ArgIndex],
_T(
"depend=")))
140 lpServiceInfo->lpDependencies = ServiceArgs[ArgIndex + 1];
142 else if (!
lstrcmpi(ServiceArgs[ArgIndex],
_T(
"obj=")))
144 lpServiceInfo->lpServiceStartName = ServiceArgs[ArgIndex + 1];
146 else if (!
lstrcmpi(ServiceArgs[ArgIndex],
_T(
"displayname=")))
148 lpServiceInfo->lpDisplayName = ServiceArgs[ArgIndex + 1];
150 else if (!
lstrcmpi(ServiceArgs[ArgIndex],
_T(
"password=")))
152 lpServiceInfo->lpPassword = ServiceArgs[ArgIndex + 1];
159 return (ArgCount == 0);
182 if (pStringBuffer ==
NULL)
192 while (*
p !=
_T(
'\0'))
201 while (*
p !=
_T(
'\0'))
211 if (pActions ==
NULL)
220 while (*
p !=
_T(
'\0'))
240 if (pActions[nCount / 2].Delay == 0 &&
errno ==
ERANGE)
251 *pcActions = nCount / 2;
252 *ppActions = pActions;
274 *ppServiceName = ServiceArgs[0];
280 if (!
lstrcmpi(ServiceArgs[ArgIndex],
_T(
"actions=")))
282 lpActions = (
LPTSTR)ServiceArgs[ArgIndex + 1];
284 else if (!
lstrcmpi(ServiceArgs[ArgIndex],
_T(
"command=")))
286 pFailureActions->lpCommand = (
LPTSTR)ServiceArgs[ArgIndex + 1];
288 else if (!
lstrcmpi(ServiceArgs[ArgIndex],
_T(
"reboot=")))
290 pFailureActions->lpRebootMsg = (
LPTSTR)ServiceArgs[ArgIndex + 1];
292 else if (!
lstrcmpi(ServiceArgs[ArgIndex],
_T(
"reset=")))
294 lpReset = (
LPTSTR)ServiceArgs[ArgIndex + 1];
301 if ((lpReset ==
NULL && lpActions !=
NULL) ||
302 (lpReset !=
NULL && lpActions ==
NULL))
304 _tprintf(
_T(
"ERROR: The reset and actions options must be used simultaneously.\n\n"));
311 pFailureActions->dwResetPeriod =
INFINITE;
313 pFailureActions->dwResetPeriod =
_ttoi(lpReset);
316 if (lpActions !=
NULL)
319 &pFailureActions->cActions,
320 &pFailureActions->lpsaActions))
326 return (ArgCount == 0);
static const OPTION_INFO TagOpts[]
BOOL ParseFailureActions(IN LPCTSTR lpActions, OUT DWORD *pcActions, OUT SC_ACTION **ppActions)
static const OPTION_INFO TypeOpts[]
BOOL ParseCreateConfigArguments(LPCTSTR *ServiceArgs, INT ArgCount, BOOL bChangeService, OUT LPSERVICE_CREATE_INFO lpServiceInfo)
static const OPTION_INFO ErrorOpts[]
static const OPTION_INFO StartOpts[]
BOOL ParseFailureArguments(IN LPCTSTR *ServiceArgs, IN INT ArgCount, OUT LPCTSTR *ppServiceName, OUT LPSERVICE_FAILURE_ACTIONS pFailureActions)
#define HeapFree(x, y, z)
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
#define SERVICE_NO_CHANGE
#define SERVICE_DEMAND_START
#define SERVICE_KERNEL_DRIVER
#define SERVICE_WIN32_SHARE_PROCESS
#define SERVICE_ERROR_SEVERE
#define SERVICE_RECOGNIZER_DRIVER
#define SERVICE_INTERACTIVE_PROCESS
#define SERVICE_AUTO_START
#define SERVICE_BOOT_START
#define SERVICE_ERROR_CRITICAL
#define SERVICE_WIN32_OWN_PROCESS
#define SERVICE_SYSTEM_START
#define SERVICE_FILE_SYSTEM_DRIVER
#define SERVICE_ERROR_IGNORE
#define SERVICE_ERROR_NORMAL