The QueryServiceStatus function retrieves the current status of the specified service.
BOOL QueryServiceStatus(
SC_HANDLE hService, |
// handle of service |
LPSERVICE_STATUS lpServiceStatus |
// address of service status structure |
); |
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 can be set by the service control manager. Other error codes can 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 SERVICE_QUERY_STATUS access. |
ERROR_INVALID_HANDLE |
The specified handle is invalid. |
The QueryServiceStatus function returns the most recent service status information reported to the service control manager. If the service just changed its status, it may not have updated the service control manager yet. Applications can find out the current service status by interrogating the service directly using the ControlService function with the SERVICE_CONTROL_INTERROGATE control code.
ControlService, CreateService, OpenService, SERVICE_STATUS, SetServiceStatus
file: /Techref/os/win/api/win32/func/src/f69_11.htm, 3KB, , updated: 2000/4/7 11:19, local time: 2024/11/8 17:40,
3.129.63.242:LOG IN ©2024 PLEASE DON'T RIP! THIS SITE CLOSES OCT 28, 2024 SO LONG AND THANKS FOR ALL THE FISH!
|
©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://massmind.ecomorder.com/techref/os/win/api/win32/func/src/f69_11.htm"> QueryServiceStatus</A> |
Did you find what you needed? |
Welcome to ecomorder.com! |
Welcome to massmind.ecomorder.com! |
.