having problems using performanceCouter

hi,

i've made a program that shows the CPU idle time using the performance 
counter, using Visual C# .
however, from some reason, it works on any computer other than my home PC . 
i've searched on the net but couldn't find what causes it.
what i get is an exception that if is not caught, closes the program. here's 
a picture of what i get while debugging:
http://img294.yfrog.com/i/picture20091211182403.png/
what i think is that maybe some service of windows (that the performance 
counter needs) doesn't work well(or is just disabled) .

my computer runs on Windows Xp sp3 32bit home edition,updated as much as 
possible (to the official updates) .
please help me. i'm kinda a newb at C# (but i do know Java quite well) .

btw, i still don't get any email notifications for new posts, even if i 
choose to get them.
0
Utf
12/11/2009 4:30:01 PM
dotnet.languages.csharp 1931 articles. 0 followers. Follow

1 Replies
813 Views

Similar Articles

[PageSpeed] 48

it seems that .net framework had something wrong in its installation. i've 
tried to re-install it in many ways, but with no luck. this is why i had to 
re-install windows from scratch. now it all seems to work fine.
however, i still wish to know how to monitor the network bandwidth using the 
performanceCounter. a way that will work on any computer, and not just hose 
with a specific network card.
0
Utf
12/14/2009 11:35:01 AM
Reply:

Similar Artilces:

.rc files problem
Hello, I face some problem with .rc files in my project. Whenever I attempt to change the .rc files through IDE then the file gets totally altered despite the change being very small. It inserts some version information along with some other stuff like word 'DISCARDABLE' ( at n number of places) in the file. I change it in Microsoft Developement Environment 2003, version 7.1.3088. When I try to build the project with this changed resource, I get the error below, "fatal error CVT1100: duplicate resource . type: VERSION, name:1 , language: 0x0409 " "fatal error LNK1123: ...

Problems with MSG files
My organisation is currently running a mixed environment of Office 2000 and Office 2003. I have a user with Office 2000 who is trying to open msg files saved to a network share (i.e. in file system, not in Outlook) by a user with Office 2003. When she double clicks to open these files she gets the message 'Unable to Read Item'. We can get around this by right clicking on the msg file in the file system, choosing Send To Mail Recipient and then double clicking the msg attachment place in the new mail message. Can anyone let me know the cause of the problem and whether there is a solu...

Exchange 5.5 SMTP Relay problem #3
I had a server that was being used as a relay. I completed the following steps: 1) Rerouted incoming SMTP for inbound on domain 2) Checked hosts and clients that successfully authenticate box 3) Checked hosts and clients with these IP addresses box and left the IP address box blank. 4) Ran a telnet session to the mail server and verified that I got a 550 relaying is prohibited response. 5) I renamed the \exchsrvr\imcdata\out folder and created a new one to clear out any pending messages and re-started the IMS service. All the clients are able to send and receive mai...

Sending Mail from Access using Outlook
I have a contact database in A2000 which I have set up to use the SendObject method to send the same e-mail, through O2000, but individually addressed to around 500 contacts on the database. Outlook is run direct from my PC. Having no exchange server, for each of the 500 messages, I get the 'A program is trying to send ...' message and have to click 'Yes'. This then adds around 20-30 minutes to the mailing. Can anyone advise on how this can be done better ? Also the default text is plain text which loses some of the formatting I have set up. Can this also be changed ? TIA, Alan...

Using text in a Form to run a Query
I run a query every day against our company database to pull in specific information. I then store this information locally in my Access db. To save on space, once I'm done reviewing a record, I delete some of the fields to keep the db space low. My problem is that in the future I may have to retrieve these fields. I keep the ticket number in the Access db the same as our company database (they both have the exact same format). I create a form so that tickets can be inputted and then try to retrieve them from the company db, but it doesn't work if I try to retrieve multiple ...

Can you use multiple vlookup's to generate one answer?
I need to look up 3 different matches to generate an answer, and I was unsure of how to do this? As an example. I need it to match the piece of fruit, the state it was grown in, and the season, and then for it to return to me who the seller is. In the spreadsheet there are multiple variations of these combinations. Can this be done, what would the formula look like? EggHeadCafe - Software Developer Portal of Choice Exchange UserCredential between client and webservice in.NET http://www.eggheadcafe.com/tutorials/aspnet/5cbf012c-41f8-4133-a6bf-e3a718f0d96f/exchange-usercredential-b...

outlook 2002&office 2000
i have outlook 2002 and office 2000 i have been unable to choose word as my email editor because it tells me both outlook and office verisons must match. is there someway around this compatibility problems? (other than upgrading office to 2002?) any assistance or suggestions you can offer would be most appreciated. pamela Tools, options, mail format. N "pamela" <anonymous@discussions.microsoft.com> wrote in message news:0cae01c3d541$9c2a1520$a601280a@phx.gbl... > i have outlook 2002 and office 2000 > i have been unable to choose word as my email editor > beca...

Security problem
I have a problem can't seem to figure out. I am an admin, and I'm having some security issues with the our exchange 2003 server only. I have no problems with our Primary Domain Controller (w2k3 std) or our gateway server running ISA 2004 (w2k3 Std). From my XP workstation, if i try to remotely manage the Exchange server (via right click 'my computer'->manage->Action->connect to another computer) the mmc console comes up but if I try to review the event logs, or access the services list, or anything for that matter... I get an access denied error. If I remote desktop...

Date Format Problem
Hello All, I am using Windows XP/Office 2003 and have the following problems: I am making an attendance sheet where in Cell C4 is having value (01/09/2005) showing Sep-2005 (formatted as mm-yyyy) >From A5 downwards I wish to have the following A5 : 9-1 Thursday A6 : 9-2 Friday A7 : 9-3 Saturday I have entered the following formula in A5 =MONTH(C4)&-DAY(C4)&TEXT(C4,"DDDD") which gives me the desired result as 9-1 Thursday. My problem is when I drag it down it shows me values which I don't want...How can I drag and just have Day and the Weekday incremented as foll...

Printing problem in excel
Hello, I have a excel file which is formatted in such a way that 1:1 print matches the physical labels.( We have adjusted the height & width of cells.) Now my problem is when we print this excel from two different machines, prints are different, even though it is printed on same printer. My doubt is that it is related to aspect ratio/ screen resolution. When we print it from a machine with 17" square ( regular ) monitor prints are okay, but when we print is from machines with wide monitors prints are off. Can this happen? or am I missing something. Thanks in Advan...

when to use which basic flowchart shape?
i really need help on this... On Mon, 27 Oct 2008 15:20:04 -0700, Andriana <Andriana@discussions.microsoft.com> wrote: >i really need help on this... http://en.wikipedia.org/wiki/Flowchart For the remainder of the symbols in the flowchart stencil, use as you see fit or ignore them, some are wrong, some are out of date, some are irrelevant. -- Regards, Paul Herber, Sandrila Ltd. DFD/SSADM for Visio http://www.visio-dfd.sandrila.co.uk/ ...

deleting messages using M drive
Does anyone know if it is safe to delete individual messages by going into the M drive and deleting messages like you would delete files in a directory? Thanks, Mario Using the M:\ drive to do anything other than view the data is not suggested. If there is another way to delete the specific items, I would suggest you use it instead of the M:\ drive. This is why in Exchange 2003 we have removed the M:\ drive mapping. --Chris ============================================================================ ==== This posting is provided "AS IS" with no warranties, and confers no rights....

Problems with 11.4.0 updates
I have tried several times to update Office 2004 with the 11.4.0 updates. Each time, I get as far as a screen that tells me that the program is "searching for programs to update." The rainbow disk spins forever, and I finally when I go to force quit the update, I am told it is not responsive. For what it is worth, I have upgraded to Leopard and use Firefox. I would appreciate any thoughts! Don On 2/20/08 11:45 AM, in article ee8e2c0.-1@webcrossing.caR9absDaxw, "deleomeyer@officeformac.com" <deleomeyer@officeformac.com> wrote: > I have tried several times to upd...

remote user cannot connect to OWA
He gets past the first username/password screen to the yellow login screen. However once he gets the second login/password box his password does not get accepted. I checked the event log on the exchange server and there is a 529 Unknown username or bad password but he insists that he typed it in correctly. What else could be causing this problem? I have an exchange 5.5 server running on windows 2000 server. ...

Hosted MS CRM SignIn ISA Problem
Hi, when I internal login to "https://company1.crm123.com" then I can normally logon to signin.aspx and will be forwarded to loader.aspx But I cant logon external via our ISA Server to that website. The signin.aspx is loaded but after the authentication is checked the signin.aspx will displayed again. The forwarding to the loader.aspx page does not take place. We have already tried all possible settings on the isa servers. Has anybody an idea to solve the problem? Many thanks Best regards Kachte hi, did anybody find any solution for this in the meantime? thanks in advance, fritz...

system manager and exadmin.dll problem
For a while now I can not open exchange system manager. Every time I do I get an error message and info is sent to Microsoft. AppName: exadmin.dll AppVer: 6.5.7226.0 AppStamp:406d1e32 ModName: kernel32.dll ModVer: 5.2.3790.1830 ModStamp:424377d2 fDebug: 0 Offset: 00015dea Strange thing is if I reinstall the exchange service pack it will work for a while then go back to not working. There are some days I really hate Microsoft for their buggy pile of un user friendly crap.... Can you tell us if you are running this buggy pile of un-user friendly crap System Man...

Problem creating export spec
Hello All I need to create an export specification for use in a TranserText macro action. I initially did this by opening a query in datasheet view, then doing File>Export, then clicking the Save All button: this then bring up the Export Text wizard screen, where I can click the Advanced button to show the Export Specification edit/save screen. This seemed to work fine, until I came to use the saved Export Specification in the macro, when I got a message that "the data being exported does not match the format described in the scheme.ini file". Guessing that this may be b...

Problem: Cant make payment to one particular payee.
Microsoft money 2004 crashes whic I try to make a register entry to a particular payee.....When I delete it (via the checkbook balance screen) it causes a message "that operation cannot be performed" message. Everything still "works" after the crash....I just don't dare click on the particular payee field..... Also archiving does not remove old entries?? [separate problem???] Repair of file function was no help, nor was uninstalling and reinstalling . If you create a new payee, are you able to manually move any of the existing transactions to the new p...

Unable to use two licences on two linked computers
Hey all, I have OS10.4.9 in my business mac network, and I installed Office X on the server and the reception computer. Initially it was the same licence and as others have described, I could not use both programs at the same time. However to improve our office efficiency, I bought a new copy of Office X today, and installed it. However it still won't let me use both versions at the same time even though now I have two licences! Why is this? The Microsoft website is not forthcoming, and they don't have any help lines to call. I can't find anywhere to input my new product key,...

Inserting data from XML File using VB.net
Hi, How can we insert the data of an XML file into a Access database using vb.net? The table in Access and the XML have exactly the same fields with same data types. regards, badri. ...

Common problem-can't find a solution
I have that common problem with Windows Mail in Vista Premium which began out of the blue recently -- I try to open email, nothing happens, then I get this error: "Windows Mail cannot be started...mail message store cannot be opened...is currently being used by another program such as a virus scanner...(0x800C0155,2) -- MSOE.dll cannot be initialized. Having read hundreds of threads about this problem, uninstalled every type of malware/virus protection I have, restored the system, and, paraphrasing some suggestions, danced a rain dance holding my crotch, but nothing work...

2nd Attempt
I have recently been having difficulties with sending emails. When I make a reply and hit send the email saves to the outbox but does so in bold normal type and refuses to send. Sometimes if I make a new msg, copy by pasting everything and then save, the email saves to outbox in italics. This is "normal" I believe. The email goes out OK then. This seems to have started spontaneously. Anyone know what is happening and why. Perhaps more importantly how do I fix it? -- Jerry ...

Problem with Money 2001 and SP2?
Has there been any reports of problems with Microsoft money 2001 and SP2? Since installing SP2 my program will no longer accept OXF formatted downloads from my bank. It loads the data into the program and does the comparison with other data in the transaction area, but whin I click done no new data shows up in the transaction area. If I download data formatted for use with Quicken, everything works. I can continue to use this method but I would like to resolve the problem if possible. ...

Using shared resources between multiple projects
I'm writing a solution formed by some projects (all mfc based). I'm thinking if it is possible using shared resources between projects, in order to make easy multilanguage support. What do you think about this? Is it a possible approach? Is it possible I have a performance issue? Should this solution give me some other problems? Regards, Paolo > I'm writing a solution formed by some projects (all mfc based). I'm > thinking if it is possible using shared resources between projects, in > order to make easy multilanguage support. > What do you think about this? Is it...

Excel Charting Problem
First timer here so here goes. I have the following rows of data which I think I would like to char as 2 adjacent stacked columns per month. The rows are NetSales(A) Gross-NetSales(A), NetSales(B) and Gross-NetSales(B). I want the NetSales values to be columns adjacent to each other and th Gross-NetSales values to be above their respective NetSales values an I want the 2 columns to be for each month (X-axis). Result would be pair of stacked columns for each month. Aim is to show, for a customer, whether or not sales have changed ove time for each of ranges A & B. Any ideas -- Message po...