用API写服务程序
CreateService()中有个
LPCTSTR lpBinaryPathName, // pointer to name of binary file
参数,它就是一个可执行文件就行了吗?
反正我建立好了服务,用StartService(hS,0,NULL);启动服务是不成功的。
用GetLastError()取得的错误码是ERROR_SERVICE_REQUEST_TIMEOUT:
“The service did not respond to the start request in a timely fashion.”
不知道该怎么检查。