MySQL 5.6.14 Source Code Document
|
Public Member Functions | |
BOOL | GetOS () |
BOOL | IsNT () |
long | Init (LPCSTR szInternName, void *ServiceThread) |
void | SetShutdownEvent (HANDLE hEvent) |
BOOL | Install (int startType, LPCSTR szInternName, LPCSTR szDisplayName, LPCSTR szFullPath, LPCSTR szAccountName=NULL, LPCSTR szPassword=NULL) |
BOOL | SeekStatus (LPCSTR szInternName, int OperationType) |
BOOL | Remove (LPCSTR szInternName) |
BOOL | IsService (LPCSTR ServiceName) |
BOOL | got_service_option (char **argv, char *service_option) |
BOOL | is_super_user () |
void | SetRunning (void) |
void | SetSlowStarting (unsigned long timeout) |
void | Stop (void) |
Public Attributes | |
BOOL | bOsNT |
true if OS is NT, false for Win95 | |
DWORD | dwDesiredAccess |
DWORD | dwServiceType |
DWORD | dwStartType |
DWORD | dwErrorControl |
LPSTR | szLoadOrderGroup |
LPDWORD | lpdwTagID |
LPSTR | szDependencies |
OSVERSIONINFO | osVer |
int | nStartTimeOut |
int | nStopTimeOut |
int | nPauseTimeOut |
int | nResumeTimeOut |
DWORD | my_argc |
LPTSTR * | my_argv |
HANDLE | hShutdownEvent |
int | nError |
DWORD | dwState |
Static Protected Member Functions | |
static void | ServiceMain (DWORD argc, LPTSTR *argv) |
static void | ServiceCtrlHandler (DWORD ctrlCode) |
Protected Attributes | |
LPSTR | ServiceName |
HANDLE | hExitEvent |
SERVICE_STATUS_HANDLE | hServiceStatusHandle |
BOOL | bPause |
BOOL | bRunning |
HANDLE | hThreadHandle |
THREAD_FC | fpServiceThread |
Definition at line 17 of file nt_servc.h.
long NTService::Init | ( | LPCSTR | szInternName, |
void * | ServiceThread | ||
) |
Registers the main service thread with the service manager.
ServiceThread | pointer to the main programs entry function when the service is started |
Definition at line 89 of file nt_servc.cc.
BOOL NTService::Install | ( | int | startType, |
LPCSTR | szInternName, | ||
LPCSTR | szDisplayName, | ||
LPCSTR | szFullPath, | ||
LPCSTR | szAccountName = NULL , |
||
LPCSTR | szPassword = NULL |
||
) |
Installs the service with Service manager.
nError values:
Definition at line 118 of file nt_servc.cc.
BOOL NTService::Remove | ( | LPCSTR | szInternName | ) |
Removes the service.
nError values:
Definition at line 177 of file nt_servc.cc.
|
staticprotected |
This is the function that is called from the service manager to start the service.
Definition at line 229 of file nt_servc.cc.
void NTService::SetSlowStarting | ( | unsigned long | timeout | ) |
Sets a timeout after which SCM will abort service startup if SetRunning() was not called or the timeout was not extended with another call to SetSlowStarting(). Should be called when static initialization completes, and the variable initialization part begins
Definition at line 282 of file nt_servc.cc.
void NTService::Stop | ( | void | ) |
this function should be called before the app. exits to stop the service
Definition at line 216 of file nt_servc.cc.