Re: PerfFormattedData?



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

.



Relevant Pages

  • kernel-image-2.6.8-2-k7, and parallel port printing
    ... printer, and try as I might, I could only get garbage out. ... Any hints on what hoops I have to jump through to get printing to ... cooperate again with 2.6.8-2-k7 very much appreciated? ...
    (Debian-User)
  • Re: question on fread()
    ... > hi here is my test code ... > why and how that garbage output is coming? ... characters those bytes represent in your character set. ... printing instead of "%d". ...
    (comp.lang.c)
  • Re: Can OnPrint output be saved to a file?
    ... I have tried with HP LaserJet Series II and with Lexmark Z52 as printers. ... Both produce garbage. ... When printing to the printer there are no ...
    (microsoft.public.vc.mfc)
  • Windows.Forms equired for printing?
    ... It seems a reference to System.Windows.Forms is required for printing ... I tried printing in a console app w/o a rference to it and ... got garbage. ... Added the reference and it works now. ...
    (microsoft.public.dotnet.languages.csharp)