make sure handles are marked invalid

This commit is contained in:
Doug MacEachern committed 2005-02-20 00:16:18 +00:00
1 parent 894b300ad0
commit ab6c32409d
1 file changed
+2
@@ -36,6 +36,7 @@ public class Pdh extends Win32Bindings {
if (h_query != -1l) {
pdhCloseQuery(h_query);
h_query = -1l;
}
}
@@ -47,6 +48,7 @@ public class Pdh extends Win32Bindings {
public double getSingleValue() throws Win32Exception {
if (h_counter != -1l) {
pdhRemoveCounter(h_counter);
h_counter = -1l;
}
h_counter = pdhAddCounter(h_query, getCounterPath());