|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Category does not exist?System.InvalidOperationException: Category does not exist.
at System.Diagnostics.PerformanceCounterLib.CounterExists(String machine, String category, String counter) at System.Diagnostics.PerformanceCounter.Initialize() at System.Diagnostics.PerformanceCounter.NextSample() at System.Diagnostics.PerformanceCounter.NextValue() at ProcessManager.frmMain.Timer2_Tick(Object sender, EventArgs e) at System.Windows.Forms.Timer.OnTick(EventArgs e) at System.Windows.Forms.Timer.Callback(IntPtr hWnd, Int32 msg, IntPtr idEvent, IntPtr dwTime) ********************************************* How to slove this problem? Thank you Supply some code to do with Timer 2 on frmMain, which will help matters
somewhat. Why don't you convert your Handle (Hwnd) to integer, idEvent to integer & dwTime to either integer or double? Again, we need your code to help you Crouchie1998 BA (HONS) MCP MCSE Official Microsoft Beta Tester Thank you, my code:
**************************************** For Each eachProcess As Process In Process.GetProcesses() arrPro(0) = eachProcess.MainModule.ModuleName .... Next **************************************** Show quoteHide quote "Crouchie1998" <crouchie1998@spamcop.net> дÈëÏûÏ¢ÐÂÎÅ:uXrPf4BQFHA.***@tk2msftngp13.phx.gbl... > Supply some code to do with Timer 2 on frmMain, which will help matters > somewhat. > > Why don't you convert your Handle (Hwnd) to integer, idEvent to integer & > dwTime to either integer or double? > > Again, we need your code to help you > > Crouchie1998 > BA (HONS) MCP MCSE > Official Microsoft Beta Tester > > "yxq" <ga***@163.net> schrieb: 'Process' is based on performance counters, if they are disabled or you > For Each eachProcess As Process In Process.GetProcesses() > arrPro(0) = eachProcess.MainModule.ModuleName don't have rights to access them using 'Process.GetProcesses' will fail. In Windows 2003 you will have to add the user to a certain group in order to be able to access performance counters: <URL:http://groups.google.de/groups?selm=eiSs875PDHA.1072%40TK2MSFTNGP10.phx.gbl> -- M S Herfried K. Wagner M V P <URL:http://dotnet.mvps.org/> V B <URL:http://classicvb.org/petition/> My OS is Windows XP, how to ensure to enable performance counters?
Show quoteHide quote "Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.at> дÈëÏûÏ¢ÐÂÎÅ:%23Or6cXEQFHA.1***@TK2MSFTNGP12.phx.gbl... > "yxq" <ga***@163.net> schrieb: >> For Each eachProcess As Process In Process.GetProcesses() >> arrPro(0) = eachProcess.MainModule.ModuleName > > 'Process' is based on performance counters, if they are disabled or you > don't have rights to access them using 'Process.GetProcesses' will fail. > In Windows 2003 you will have to add the user to a certain group in order > to be able to access performance counters: > > <URL:http://groups.google.de/groups?selm=eiSs875PDHA.1072%40TK2MSFTNGP10.phx.gbl> > > -- > M S Herfried K. Wagner > M V P <URL:http://dotnet.mvps.org/> > V B <URL:http://classicvb.org/petition/>
Loop ?
How to update an application Binding an Array to a Combo Box SqlDataReader accessed only by field ordinals? Singleton Pattern for Database Access --- Leave Open or Close Connection Finding Version of All Asemblies Required by Application repainting problem How to Publish a Project to Production Server special character inside a string MsgBox Problem |
|||||||||||||||||||||||