Re: PerfFormattedData?

Tech-Archive recommends: Speed Up your PC by fixing your registry



The documents say [Win32_PerfFormattedData_PerfOS_System].SystemUpTime
is UINT64, and after this

bstrUtil = SysAllocString(L"Win32_PerfFormattedData_PerfOS_System");
hr = pNameSpace->CreateInstanceEnum(bstrUtil, 0, NULL, &pEnum);
hr = pEnum->Next(5000, 1, &pWbemObject, &dwReturned);
hr = pWbemObject->Get(L"SystemUpTime", 0, &dt, &vt, NULL);

the VARTYPE vt also says it's CIM_UINT64.

But dt.vt says it's a BSTR, and the way to see the correct result is
to print the string:

_tprintf(_T("Seconds: %S\n"), dt.bstrVal);

What's up here? Is something buggy or am I missing something?
.



Relevant Pages