xyntservice
http://www.thecodeproject.com/system/xyntservice.asp
http://www.codeproject.com/useritems/XYNTServiceWrapper.asp
一个用户windows下自启动程序的服务进程,很不错.
只是在windows 2003 +sp1下启动服务时报87错误, 因此需要修改源代码.
将XYNTServiceMain中的.
在其它OS中未出现此错误.
http://www.codeproject.com/useritems/XYNTServiceWrapper.asp
一个用户windows下自启动程序的服务进程,很不错.
只是在windows 2003 +sp1下启动服务时报87错误, 因此需要修改源代码.
将XYNTServiceMain中的.
// 以下是C++的语法.
// Handle error condition
status = GetLastError();
if (status!=NO_ERROR)
{
serviceStatus.dwCurrentState = SERVICE_STOPPED;
serviceStatus.dwCheckPoint = 0;
serviceStatus.dwWaitHint = 0;
serviceStatus.dwWin32ExitCode = status;
serviceStatus.dwServiceSpecificExitCode = specificError;
SetServiceStatus(hServiceStatusHandle, &serviceStatus);
return;
}
全部注释掉之后重新编译即可.// Handle error condition
status = GetLastError();
if (status!=NO_ERROR)
{
serviceStatus.dwCurrentState = SERVICE_STOPPED;
serviceStatus.dwCheckPoint = 0;
serviceStatus.dwWaitHint = 0;
serviceStatus.dwWin32ExitCode = status;
serviceStatus.dwServiceSpecificExitCode = specificError;
SetServiceStatus(hServiceStatusHandle, &serviceStatus);
return;
}
在其它OS中未出现此错误.