Connecting Tech Pros Worldwide Forums | Help | Site Map

How WIN32 API works with .NET?

Newbie
 
Join Date: Aug 2007
Posts: 4
#1: Sep 10 '07
Hi,

I have 2 solutions to get CPU usage of a Process. In one i am using Performance Counters and in the second i am using Win32 API GetProcessTimes(). When i execute the my application using Performance counter, my application itself takes 70 - 80 % CPU and some memory but when i execute my application using Win32 API GetProcessTimes() , my application takes zero% CPU usage and no memory , but the result i get it late i.e. the CPU usage of the selected process as compared to Performance counter. SO i wanted to know from where or which process, WIN32 API takes CPU usage and memory or how Win32 API works with .NET. I am unable to decide which is the optimal solution.

I need information as soon as Possible , please help me

Thanks
Vijayalakshmi

Reply