api控制系统服务SC_HANDLE  sc=OpenSCManager(NULL,NULL,SC_MANAGER_ALL_ACCESS); //服务控制器
api控制系统服务
api控制系统服务
//获得服务状态
api控制系统服务
DWORD get_srvst(SC_HANDLE sc)
api控制系统服务
api控制系统服务
int Open_Service(SC_HANDLE sc)
}
dwCurrentState
Current state of the service. This member can be one of the following values.
Value Meaning
SERVICE_CONTINUE_PENDING
0x00000005
The service continue is pending.
SERVICE_PAUSE_PENDING
0x00000006
The service pause is pending.
SERVICE_PAUSED
0x00000007
The service is paused.
SERVICE_RUNNING
0x00000004
The service is running.
SERVICE_START_PENDING
0x00000002
The service is starting.
SERVICE_STOP_PENDING
0x00000003
The service is stopping.
SERVICE_STOPPED
0x00000001
The service is not running.

相关文章: