ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/projects/libstatgrab/src/libstatgrab/win32.c
(Generate patch)

Comparing projects/libstatgrab/src/libstatgrab/win32.c (file contents):
Revision 1.1 by tdb, Sat Sep 24 13:29:23 2005 UTC vs.
Revision 1.2 by tdb, Sat Feb 18 15:24:59 2006 UTC

# Line 40 | Line 40 | int read_counter_double(pdh_enum counter, double *resu
40   {
41          PDH_STATUS pdh_status;
42          PDH_FMT_COUNTERVALUE *item_buf;
43 <        HCOUNTER *phcounter = current_han[counter];
43 >        HCOUNTER hcounter = current_han[counter];
44  
45 <        if(phcounter == NULL)
45 >        if(hcounter == NULL)
46                  return -1;
47  
48          item_buf = sg_malloc(sizeof(PDH_FMT_COUNTERVALUE));
# Line 50 | Line 50 | int read_counter_double(pdh_enum counter, double *resu
50                  return -1;
51          }
52  
53 <        pdh_status = PdhGetFormattedCounterValue(phcounter, PDH_FMT_DOUBLE, NULL,
53 >        pdh_status = PdhGetFormattedCounterValue(hcounter, PDH_FMT_DOUBLE, NULL,
54                          item_buf);
55          if(pdh_status != ERROR_SUCCESS) {
56                  free(item_buf);
# Line 61 | Line 61 | int read_counter_double(pdh_enum counter, double *resu
61          return 0;
62   }
63  
64 < static int read_counter_large_int(HCOUNTER phcounter, long long *result)
64 > static int read_counter_large_int(HCOUNTER hcounter, long long *result)
65   {
66          PDH_STATUS pdh_status;
67          PDH_FMT_COUNTERVALUE *item_buf;
68  
69 <        if(phcounter == NULL)
69 >        if(hcounter == NULL)
70                  return -1;
71  
72          item_buf = sg_malloc(sizeof(PDH_FMT_COUNTERVALUE));
# Line 74 | Line 74 | static int read_counter_large_int(HCOUNTER phcounter,
74                  return -1;
75          }
76  
77 <        pdh_status = PdhGetFormattedCounterValue(phcounter, PDH_FMT_LARGE, NULL,
77 >        pdh_status = PdhGetFormattedCounterValue(hcounter, PDH_FMT_LARGE, NULL,
78                          item_buf);
79          if(pdh_status != ERROR_SUCCESS) {
80                  free(item_buf);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines