Posted July 22, 201113 yr 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 .
July 22, 201113 yr Hi, Can you post the entire code? -------------------------------------------------------- Tu peux aussi crire en franais. Du kannst auch auf Deutsch schreiben. Puoi scrivere anche in italiano. --------------------------------------------------------
July 22, 201113 yr Author Sorry but as these are confidential data i can post the entire code and also its a huge code too
July 22, 201113 yr I don't think you can get the AGENT status from another process. -------------------------------------------------------- Tu peux aussi crire en franais. Du kannst auch auf Deutsch schreiben. Puoi scrivere anche in italiano. --------------------------------------------------------
July 23, 201113 yr Author I don't think you can get the AGENT status from another process. But the same code was working on window server 2003. Is this a limitation for window 2008
July 24, 201113 yr No idea... sorry. -------------------------------------------------------- Tu peux aussi crire en franais. Du kannst auch auf Deutsch schreiben. Puoi scrivere anche in italiano. --------------------------------------------------------
July 25, 201113 yr Author 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.
July 25, 201113 yr 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: http://msdn.microsoft.com/en-us/library/aa373088(v=VS.85).aspx Or you can get it by using WMI: http://msdn.microsoft.com/en-us/library/aa392397%28VS.85%29.aspx -------------------------------------------------------- Tu peux aussi crire en franais. Du kannst auch auf Deutsch schreiben. Puoi scrivere anche in italiano. --------------------------------------------------------