Window Server 2008 Issue

sasethia

New member
Joined
Jul 22, 2011
Messages
4
Location
INDIA
Hi ,
I am trying to use openThread() to get cpu utilization of an agent from process a .So i just want to check if
its possible ? I am trying to open agent thread from a different process b not from process a.The below code is used for the same


tempTID = kernelTID;
thrdHand=OpenThread(THREAD_QUERY_INFORMATION,FALSE,tempTID);


The above function return error code as 5 ie thrHand is found to be Null.
I dont see any issue on tempTID.


I have all the privileges and rights which allows me to use the above function .
 
Just to add more on the above topic . I am trying to get cpu utilization of a thread from a different process b not from process a.
 
Code:
http://msdn.microsoft.com/en-us/library/ms686769(v=vs.85).aspx

It looks like this code doesn't work anymore...

You can use performance counter:
Code:
http://msdn.microsoft.com/en-us/library/aa373088(v=VS.85).aspx

Or you can get it by using WMI:
Code:
http://msdn.microsoft.com/en-us/library/aa392397%28VS.85%29.aspx
 
Back
Top