cleanup control stuff
This commit is contained in:
1 parent
bf281b55b6
commit
7f2451aa76
2 files changed
+15
-49
No files matched your search
@@ -67,6 +67,9 @@ JNIEXPORT jboolean SIGAR_JNI(win32_Service_ControlService)
|
||||
(JNIEnv *, jclass, jlong handle, jint control)
|
||||
{
|
||||
SERVICE_STATUS status;
|
||||
if (control == 0) {
|
||||
return StartService((SC_HANDLE)handle, 0, NULL);
|
||||
}
|
||||
return ControlService((SC_HANDLE)handle, control, &status);
|
||||
}
|
||||
|
||||
@@ -200,20 +203,6 @@ SIGAR_JNI(win32_Service_QueryServiceStatus)
|
||||
return iResult;
|
||||
}
|
||||
|
||||
JNIEXPORT jboolean SIGAR_JNI(win32_Service_StartService)
|
||||
(JNIEnv *, jclass, jlong handle)
|
||||
{
|
||||
return StartService((SC_HANDLE)handle, 0, NULL);
|
||||
}
|
||||
|
||||
JNIEXPORT jboolean SIGAR_JNI(win32_Service_StopService)
|
||||
(JNIEnv *, jclass, jlong handle)
|
||||
{
|
||||
SERVICE_STATUS status;
|
||||
|
||||
return ControlService((SC_HANDLE)handle, SERVICE_CONTROL_STOP, &status);
|
||||
}
|
||||
|
||||
JNIEXPORT jobject SIGAR_JNI(win32_Service_getServiceNames)
|
||||
(JNIEnv *env, jclass)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user