The DeleteService function marks the specified service for deletion from the service control manager database.
BOOL DeleteService(
SC_HANDLE hService |
// handle to service |
); |
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. To get extended error information, call GetLastError.
The following error codes may be set by the service control manager. Others may be set by the registry functions that are called by the service control manager.
Value |
Meaning |
ERROR_ACCESS_DENIED |
The specified handle was not opened with DELETE access. |
ERROR_INVALID_HANDLE |
The specified handle is invalid. |
ERROR_SERVICE_MARKED_FOR_DELETE |
The specified service has already been marked for deletion. |
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.
CloseServiceHandle, ControlService, CreateService, OpenService
file: /Techref/os/win/api/win32/func/src/f16_2.htm, 3KB, , updated: 2000/4/7 11:19, local time: 2024/11/14 12:31,
44.211.24.175:LOG IN
|
©2024 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions? <A HREF="http://www.piclist.com/techref/os/win/api/win32/func/src/f16_2.htm"> DeleteService</A> |
Did you find what you needed? |
PICList 2024 contributors:
o List host: MIT, Site host massmind.org, Top posters @none found - Page Editors: James Newton, David Cary, and YOU! * Roman Black of Black Robotics donates from sales of Linistep stepper controller kits. * Ashley Roll of Digital Nemesis donates from sales of RCL-1 RS232 to TTL converters. * Monthly Subscribers: Gregg Rew. on-going support is MOST appreciated! * Contributors: Richard Seriani, Sr. |
Welcome to www.piclist.com! |
.