Re: PerfFormattedData?
- From: Vincent Fatica <abuse@localhost>
- Date: Fri, 24 Jun 2005 14:12:23 -0400
I must amend my remarks. If I ask for a 32-bit value, I get correct
results; for example changing "SystemUpTime" to
"PercentRegistryQuotaInUse" (which needs cooking) and printing (%I32u)
dt.ulVal. Other 32-bit values are correct too. None of the 64-bit
values appear correct.
On Thu, 23 Jun 2005 22:49:29 -0400, Vincent Fatica <abuse@localhost>
wrote:
>This code (below) and the code leading up to it apparently work (that
>is, they produce no errors). "vt" is CIM_UINT64, but dt.ullVal
>contains garbage (Seconds: 14106050013257106332). No matter what
>property of PerfOSSystem I ask for, the code works but gives what
>looks like garbage. The code was adapted from working code that got
>LastBootUpTime from Win32_OperatingSystem and, from it, correctly
>computed uptime. Any thoughts? Thanks. - Vince
>
>hr =
>pNameSpace->CreateInstanceEnum(_T("Win32_PerfFormattedData_PerfOS_System"),
> 0, NULL, &pEnum);
>if ( FAILED(hr) ) OutOfHere(4, hr);
>
>
>hr = pEnum->Next(5000, 1, &pWbemObject, &dwReturned);
>if ( FAILED(hr) ) OutOfHere(5, hr);
>
>hr = pWbemObject->Get(_T("SystemUpTime"), 0, &dt, &vt, NULL);
>if ( FAILED(hr) ) OutOfHere(6, hr);
>
>_tprintf(_T("Seconds: %I64u\n"), dt.ullVal);
.
- Follow-Ups:
- Re: PerfFormattedData?
- From: Vincent Fatica
- Re: PerfFormattedData?
- References:
- PerfFormattedData?
- From: Vincent Fatica
- PerfFormattedData?
- Prev by Date: Re: Target system hung during powerdown by WMI and Win32ShutDown
- Next by Date: Re: Folder Security Descriptor on a remote computer
- Previous by thread: PerfFormattedData?
- Next by thread: Re: PerfFormattedData?
- Index(es):
Relevant Pages
|
|