From e91665d842c7a2462fdbbb5560d88a7667e7e8dd Mon Sep 17 00:00:00 2001 From: Doug MacEachern Date: Sat, 25 Jun 2005 17:01:08 +0000 Subject: [PATCH] remove QueryServiceStartType --- bindings/java/src/jni/win32/service.cpp | 23 ------------------- .../src/net/hyperic/sigar/win32/Service.java | 6 ----- 2 files changed, 29 deletions(-) diff --git a/bindings/java/src/jni/win32/service.cpp b/bindings/java/src/jni/win32/service.cpp index 68f5350f..09d55a94 100644 --- a/bindings/java/src/jni/win32/service.cpp +++ b/bindings/java/src/jni/win32/service.cpp @@ -318,29 +318,6 @@ SIGAR_JNI(win32_Service_QueryServiceStatus) return iResult; } -JNIEXPORT jint SIGAR_JNI(win32_Service_QueryServiceStartType) -(JNIEnv *, jclass, jlong handle) -{ - LPQUERY_SERVICE_CONFIG config; - int iResult; - DWORD dwBytesNeeded; - - config = (LPQUERY_SERVICE_CONFIG) LocalAlloc(LPTR, 4096); - if (config == NULL) - return -1; - - /* Get the configuration information. */ - - if (QueryServiceConfig((SC_HANDLE)handle, config, 4096, - &dwBytesNeeded) == 0) { - iResult = -1; - } - else - iResult = config->dwStartType; - - return iResult; -} - JNIEXPORT jboolean SIGAR_JNI(win32_Service_StartService) (JNIEnv *, jclass, jlong handle) { diff --git a/bindings/java/src/net/hyperic/sigar/win32/Service.java b/bindings/java/src/net/hyperic/sigar/win32/Service.java index 82e525ba..1a43f1dd 100644 --- a/bindings/java/src/net/hyperic/sigar/win32/Service.java +++ b/bindings/java/src/net/hyperic/sigar/win32/Service.java @@ -206,11 +206,6 @@ public class Service extends Win32Bindings implements java.io.Serializable return QueryServiceStatus(this.m_hService); } - public int startType() - { - return QueryServiceStartType(this.m_hService); - } - public void stop() throws Win32Exception { if(StopService(this.m_hService) == false) @@ -320,7 +315,6 @@ public class Service extends Win32Bindings implements java.io.Serializable String service, int access); private static final native int QueryServiceStatus(long handle); - private static final native int QueryServiceStartType(long handle); private static final native boolean StartService(long handle); private static final native boolean StopService(long handle);