1 #ifndef NT_SERVC_INCLUDED
2 #define NT_SERVC_INCLUDED
15 typedef void (*THREAD_FC)(
void *);
25 DWORD dwDesiredAccess;
30 LPSTR szLoadOrderGroup;
44 HANDLE hShutdownEvent;
49 BOOL IsNT() {
return bOsNT;}
51 long Init(LPCSTR szInternName,
void *ServiceThread);
54 void SetShutdownEvent(HANDLE hEvent){ hShutdownEvent=hEvent; }
58 BOOL
Install(
int startType,LPCSTR szInternName,LPCSTR szDisplayName,
59 LPCSTR szFullPath, LPCSTR szAccountName=NULL,
60 LPCSTR szPassword=NULL);
61 BOOL SeekStatus(LPCSTR szInternName,
int OperationType);
62 BOOL
Remove(LPCSTR szInternName);
63 BOOL IsService(LPCSTR ServiceName);
64 BOOL got_service_option(
char **argv,
char *service_option);
72 void SetRunning(
void);
93 SERVICE_STATUS_HANDLE hServiceStatusHandle;
97 THREAD_FC fpServiceThread;
100 void ResumeService();
105 static void ServiceCtrlHandler (DWORD ctrlCode);
107 void Exit(DWORD error);
108 BOOL SetStatus (DWORD dwCurrentState,DWORD dwWin32ExitCode,
109 DWORD dwServiceSpecificExitCode,
110 DWORD dwCheckPoint,DWORD dwWaitHint);