remove QueryServiceStartType
This commit is contained in:
parent
1163e0c803
commit
e91665d842
|
@ -318,29 +318,6 @@ SIGAR_JNI(win32_Service_QueryServiceStatus)
|
||||||
return iResult;
|
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)
|
JNIEXPORT jboolean SIGAR_JNI(win32_Service_StartService)
|
||||||
(JNIEnv *, jclass, jlong handle)
|
(JNIEnv *, jclass, jlong handle)
|
||||||
{
|
{
|
||||||
|
|
|
@ -206,11 +206,6 @@ public class Service extends Win32Bindings implements java.io.Serializable
|
||||||
return QueryServiceStatus(this.m_hService);
|
return QueryServiceStatus(this.m_hService);
|
||||||
}
|
}
|
||||||
|
|
||||||
public int startType()
|
|
||||||
{
|
|
||||||
return QueryServiceStartType(this.m_hService);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void stop() throws Win32Exception
|
public void stop() throws Win32Exception
|
||||||
{
|
{
|
||||||
if(StopService(this.m_hService) == false)
|
if(StopService(this.m_hService) == false)
|
||||||
|
@ -320,7 +315,6 @@ public class Service extends Win32Bindings implements java.io.Serializable
|
||||||
String service,
|
String service,
|
||||||
int access);
|
int access);
|
||||||
private static final native int QueryServiceStatus(long handle);
|
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 StartService(long handle);
|
||||||
private static final native boolean StopService(long handle);
|
private static final native boolean StopService(long handle);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue