Search code examples
c++processwindows-mobilewindows-cetaskmanager

Is it possible to get the memory usage for all the Dll's associated with the specified process in WinCE using c++?


I have created the TaskManagerUtility application which will give me information of all the process currently running in windows mobile device.

Currently I am able to collect information such as mentioned below:-

 1. Process Name
 2. Process ID
 3. Thread ID (associated with the specified process)
 4. Thread Count (total number of threads associated with the specified process)
 5. DLL Name (associated with the specified process)
 6. Process Memory Usage
 7. Process Peak Memory Usage
 8. Process CPU Time
 9. Process CPU utilization

Is there any way by which I can find out the total memory usage by all individual Dll's associated with the specified process?

Is it possible to implement the same? Is there any API which can do so?

If 'NO', then why it is not possible?

Please guide me as I am not getting any clue for this.

Thanks in advance.


Solution

  • From a kernel perspective, the DLLs do not allocate memory the process does, so there's no way to know what DLL allocated what blocks of memory. You can determine how much memory the process has allocated in heaps by using the ToolHelp Functions, specifically Heap32ListFirst and Heap32ListNext.