Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

CPU Usage in NT

Posted on 1999-07-14
5
Medium Priority
?
168 Views
Last Modified: 2013-11-20
How do I get registry values in HKEY_DYN_DATA?  I am
particularly interested in KERNEL\CPUUsage, memory, etc
in NT.
0
Comment
Question by:ramrocket
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 7

Expert Comment

by:leflon
ID: 1309964
NT does not the registry key HKEY_DYN_DATA.
it is only supported under win95.
0
 

Author Comment

by:ramrocket
ID: 1309965
there's got to be a way to get these information
in NT.
0
 
LVL 23

Expert Comment

by:naveenkohli
ID: 1309966
Make use of GlobalMemoryStatus API call..

Here is sample from one of my applicatins..

HRESULT CMemoryInformation::GetInformation ()
{
      HRESULT hRes = S_OK;
      MEMORYSTATUS memoryStatus;

      if (m_bInformationObtained) {
            return S_OK;
      }

      memset (&memoryStatus, sizeof (MEMORYSTATUS), 0);
      memoryStatus.dwLength = sizeof (MEMORYSTATUS);

      // The function below doesn't return a value.

      GlobalMemoryStatus (&memoryStatus);

      m_sMemoryLoad = memoryStatus.dwMemoryLoad;
      m_lRAMInstalled = memoryStatus.dwTotalPhys;
      m_lMemoryAvailable = memoryStatus.dwAvailPhys;
      m_lVirtualMemory = memoryStatus.dwTotalVirtual;

      m_bInformationObtained = true;

      return S_OK;
}
0
 
LVL 23

Expert Comment

by:naveenkohli
ID: 1309967
You have rejected the answer without any comment.... did any of the suggestiosn work for you?
0
 
LVL 23

Accepted Solution

by:
chensu earned 150 total points
ID: 1309968
Look into the Performance Data Helper (PDH) interface and the Processor and Memory performance objects, which contain the information you need.

http://msdn.microsoft.com/library/sdkdoc/pdh/perfdata_1vj5.htm

http://msdn.microsoft.com/library/sdkdoc/winbase/counters_35mc.htm

http://msdn.microsoft.com/library/sdkdoc/winbase/counters_8px0.htm
0

Featured Post

Survive A High-Traffic Event with Percona

Your application or website rely on your database to deliver information about products and services to your customers. You can’t afford to have your database lose performance, lose availability or become unresponsive – even for just a few minutes.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
In this post we will learn different types of Android Layout and some basics of an Android App.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question