473,406 Members | 2,619 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Category does not exist?

yxq
System.InvalidOperationException: Category does not exist.
at System.Diagnostics.PerformanceCounterLib.CounterEx ists(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
Nov 21 '05 #1
4 3144
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
Nov 21 '05 #2
yxq
Thank you, my code:
****************************************
For Each eachProcess As Process In Process.GetProcesses()
arrPro(0) = eachProcess.MainModule.ModuleName
....
Next
****************************************

"Crouchie1998" <cr**********@spamcop.net> 写入消息新闻:uX*************@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

Nov 21 '05 #3
"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.gb l>

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #4
yxq
My OS is Windows XP, how to ensure to enable performance counters?

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> 写入消息新闻:%2****************@TK2MSFTNGP12.phx.g bl...
"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.gb l>

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Rich Protzel | last post by:
Hello, So my table contains say 100,000 records, and I need to group the categories in fld1 by the highest count of subcategories. Say fld1 contains categories A, B, C, D, E. All of these...
0
by: Dirk F鰎sterling | last post by:
Hi all, a few days ago, I upgraded from PostgreSQL 7.2.1 to 7.4, following the instructions in the INSTALL file, including dump and restore. All this worked fine without any error (message). ...
15
by: Hi5 | last post by:
Hi, I am designing a database for a client in which It has a client table including the followings: 1-Table Client 2-Table lookupcategory 3-Table Ctegory
4
by: Robert Hooker | last post by:
Hi all, I'm looking for a way to sort/order the Category text items in a property grid. The grids sort the categories by alpha when the catergories are displayed. Does anyone at Microsoft (or...
5
by: David N | last post by:
All, I created a control that have the following property defined: private bool autoSearch My control is compiled and created fine. But, after adding the control to my form, I noticed...
1
by: LP | last post by:
Hi, I am trying to run my webservice which creates a performance counetr and writes to it on Windows 2003, where the following error is returned. It runs fine on Windows 2000. Error: ...
16
by: lawrence k | last post by:
I've a file upload script on my site. I just now used it to upload a small text document (10k). Everything worked fine. Then I tried to upload a 5.3 meg Quicktime video. Didn't work. I've...
7
by: fiziwig | last post by:
Newbie here. I have a page that uses a <select> list to assign a category to an itme, however it is possible for an item to have more than one category assigned. Right now I have to enter the item...
669
by: Xah Lee | last post by:
in March, i posted a essay 鈥淲hat is Expressiveness in a Computer Language鈥, archived at: http://xahlee.org/perl-python/what_is_expresiveness.html I was informed then that there is a academic...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project梡lanning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.