|
-
Apr 28th, 2013, 12:09 PM
#17
Re: Cpu Utilization in vb6
 Originally Posted by Doogle
@Bonnie: You may like to run the WMI Browser and see if you can find (in the CIMV2 Namespace) the Classes. I know that some classes have been 'moved about' by MS with various Versions of Windows.
You should find the Win32_Processor class in:
CIM_Managed_System_Element -> CIM_LogicalDevice -> CIM_Processor
The LoadPercentage property is an unsigned 16 bit integer.
The Win32_PerfFormattedData_Counters_ProcessorInformation class should be found in
CIM_StatisticalInformation -> Win32_Perf -> Win32_PerfFormattedData
I only had a quick look, but unfortunately, I couldn't find both classes in those locations. I didn't try searching further because I was overwhelmed by the number of available classes. Thanks anyway!
On Local Error Resume Next: If Not Empty Is Nothing Then Do While Null: ReDim i(True To False) As Currency: Loop: Else Debug.Assert CCur(CLng(CInt(CBool(False Imp True Xor False Eqv True)))): Stop: On Local Error GoTo 0
Declare Sub CrashVB Lib "msvbvm60" (Optional DontPassMe As Any)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|