make sure handles are marked invalid

This commit is contained in:
Doug MacEachern 2005-02-20 00:16:18 +00:00
parent 894b300ad0
commit ab6c32409d
1 changed files with 2 additions and 0 deletions

View File

@ -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());