declare that the native methods throw Win32Exception

This commit is contained in:
Doug MacEachern 2005-01-20 00:48:19 +00:00
parent 00e64ab40d
commit c462123080
1 changed files with 15 additions and 8 deletions

View File

@ -74,15 +74,22 @@ public class Pdh extends Win32Bindings {
this.counterPath = cp; this.counterPath = cp;
} }
private static final native long pdhOpenQuery(); private static final native long pdhOpenQuery() throws Win32Exception;
private static final native void pdhCloseQuery(long query); private static final native void pdhCloseQuery(long query)
private static final native long pdhAddCounter(long query, String cp); throws Win32Exception;
private static final native void pdhRemoveCounter(long counter); private static final native long pdhAddCounter(long query, String cp)
throws Win32Exception;
private static final native void pdhRemoveCounter(long counter)
throws Win32Exception;
private static final native double pdhGetSingleValue(long query, private static final native double pdhGetSingleValue(long query,
long counter); long counter)
private static final native String[] pdhGetInstances(String cp); throws Win32Exception;
private static final native String[] pdhGetKeys(String cp); private static final native String[] pdhGetInstances(String cp)
private static final native String[] pdhGetObjects(); throws Win32Exception;
private static final native String[] pdhGetKeys(String cp)
throws Win32Exception;
private static final native String[] pdhGetObjects()
throws Win32Exception;
/** /**
* Main method for dumping the entire PDH * Main method for dumping the entire PDH