调用API中的DeleteService来删除Windows服务时,服务总是标识已禁用,关掉我的程序,删除的服务就消失了
没发现哪个东西没有释放掉,不知大家碰到过没有?
------解决方案--------------------http://lib.hackbase.com/html/14/31905.htm
------解决方案--------------------没碰到...
------解决方案--------------------帮顶
------解决方案--------------------The DeleteService function marks a service for deletion from the service control manager database. The database entry is not removed until all open handles to the service have been closed by calls to the CloseServiceHandle function, and the service is not running. A running service is stopped by a call to the ControlService function with the SERVICE_CONTROL_STOP control code. If the service cannot be stopped, the database entry is removed when the system is restarted.
The service control manager deletes the service by deleting the service key and its subkeys from the registry.