sizeof PDH_STATUS == sizeof int

This commit is contained in:
Doug MacEachern 2007-03-05 23:56:30 +00:00
parent 457463daf5
commit e0e7e7d4a0
2 changed files with 8 additions and 8 deletions

View File

@ -70,7 +70,7 @@ static char *get_error_message(PDH_STATUS status) {
} }
} }
JNIEXPORT jlong SIGAR_JNI(win32_Pdh_validate) JNIEXPORT jint SIGAR_JNI(win32_Pdh_validate)
(JNIEnv *env, jclass cur, jstring jpath) (JNIEnv *env, jclass cur, jstring jpath)
{ {
PDH_STATUS status; PDH_STATUS status;

View File

@ -33,32 +33,32 @@ public class Pdh extends Win32 {
/** /**
* The returned data is valid. * The returned data is valid.
*/ */
public static final long CSTATUS_VALID_DATA = 0x00000000L; public static final int CSTATUS_VALID_DATA = 0x00000000;
/** /**
* The specified instance is not present. * The specified instance is not present.
*/ */
public static final long CSTATUS_NO_INSTANCE = 0x800007D1L; public static final int CSTATUS_NO_INSTANCE = 0x800007D1;
/** /**
* The specified counter could not be found. * The specified counter could not be found.
*/ */
public static final long CSTATUS_NO_COUNTER = 0xC0000BB9L; public static final int CSTATUS_NO_COUNTER = 0xC0000BB9;
/** /**
* The specified object is not found on the system. * The specified object is not found on the system.
*/ */
public static final long CSTATUS_NO_OBJECT = 0xC0000BB8L; public static final int CSTATUS_NO_OBJECT = 0xC0000BB8;
/** /**
* Unable to connect to specified machine or machine is off line. * Unable to connect to specified machine or machine is off line.
*/ */
public static final long CSTATUS_NO_MACHINE = 0x800007D0L; public static final int CSTATUS_NO_MACHINE = 0x800007D0;
/** /**
* Unable to parse the counter path. * Unable to parse the counter path.
*/ */
public static final long CSTATUS_BAD_COUNTERNAME = 0xC0000BC0L; public static final int CSTATUS_BAD_COUNTERNAME = 0xC0000BC0;
public static final String PERFLIB_KEY = public static final String PERFLIB_KEY =
"SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Perflib"; "SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Perflib";
@ -302,7 +302,7 @@ public class Pdh extends Win32 {
return pdhGetObjects(); return pdhGetObjects();
} }
public static final native long validate(String path); public static final native int validate(String path);
private static final native void pdhConnectMachine(String host) private static final native void pdhConnectMachine(String host)
throws Win32Exception; throws Win32Exception;