فهرست منبع

优化:
首次安装服务时,需要单击运行SATService.exe,此时服务不存在,无须运行主程序主线程;

scbc.sat2 5 سال پیش
والد
کامیت
25acb6c860
1فایلهای تغییر یافته به همراه2 افزوده شده و 1 حذف شده
  1. 2 1
      SATService/SATService/SATService.cpp

+ 2 - 1
SATService/SATService/SATService.cpp

@@ -136,13 +136,14 @@ int _tmain(int argc, TCHAR* argv[], TCHAR* envp[])
 
 		// 2.不存在,安装服务;
 		WindowsService::InitSvcVar();
+#if 0	// 若服务不存在,无须执行主程序;
 		WindowsService::SetCallBack(WorkStart, WorkEndof);
 		SERVICE_TABLE_ENTRY st[] =
 		{
 			{ WindowsService::g_szSvcName, (LPSERVICE_MAIN_FUNCTION)WindowsService::ServiceMain },
 			{ NULL, NULL }
 		};
-
+#endif 
 		WindowsService::SvcInstall();
 	}