psychomanu Posted December 21, 2004 Report Share Posted December 21, 2004 Hi all, does anyone know how to get the CPU load without using ActiveX components? There must be some API-call for this but I didn't find it. Thanks. Quote Link to comment
AnalogKid2DigitalMan Posted December 21, 2004 Report Share Posted December 21, 2004 SimpleTaskMonitor example that ships with LV7.1 uses .NET to monitor memory, CPU usage, and processes, akin to Win Task Manager Quote Link to comment
psychomanu Posted December 21, 2004 Author Report Share Posted December 21, 2004 Thanks, I will try it. Quote Link to comment
psychomanu Posted December 22, 2004 Author Report Share Posted December 22, 2004 Hi, I tried it, it works, but only if you have .NET installed. Not everyone has this, so I would rather have a way that works on all common configurations. Is there no API-call to kernel32.dll or something similar? Quote Link to comment
tetrarch Posted December 22, 2004 Report Share Posted December 22, 2004 Hi, I tried it, it works, but only if you have .NET installed. Not everyone has this, so I would rather have a way that works on all common configurations. Is there no API-call to kernel32.dll or something similar? 3156[/snapback] NtQuerySystemInformation used to be the popular way of getting the right information. MS now recommend using other functions though (linked on the same page). Not sure how easier it's going to be to get LabView to handle the datatypes... This CodeProject page might also be of some assistance. Another approach which may or may not be better is to use the PDH.DLL (Performance Data Helper) functions. Can't remember what the general availability is (might need to distribute the DLL with your app?). They query the performance counters, which are sorta designed for this task, so they might be the best bet. cheers, Tom Quote Link to comment
psychomanu Posted December 22, 2004 Author Report Share Posted December 22, 2004 Thanks a lot for the info. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.