예제 #1
0
        public bool RunService()
        {
            ServiceTableEntry[] serviceTable = new ServiceTableEntry[]
            {
                new ServiceTableEntry {
                    lpServiceName = this.ServiceName, lpServiceProc = this.ServiceMain
                },
                new ServiceTableEntry {
                    lpServiceName = null, lpServiceProc = null
                }
            };

            return(StartServiceCtrlDispatcher(serviceTable));
        }
 private static extern bool StartServiceCtrlDispatcher(ServiceTableEntry[] lpServiceTable);
        public bool RunService()
        {
            ServiceTableEntry[] serviceTable = new ServiceTableEntry[]
            {
                new ServiceTableEntry { lpServiceName = this.ServiceName, lpServiceProc = this.ServiceMain },
                new ServiceTableEntry { lpServiceName = null, lpServiceProc = null }
            };

            return StartServiceCtrlDispatcher(serviceTable);
        }