开发者

Problem with Performance Counters on XP 64 Bit

I've got a C# application that monitors memory/pro开发者_如何学Gocessor performance. I only need to perform read operations -- so the app should run fine as a limted user.

The application runs fine on every OS/user level (admin/limited) combo I can throw at it (XP/Vista/7) except when I hit XP 64 bit. With XP x64 it crashes with an access exception saying I don't have sufficient permissions.

Has anyone succeeded in getting performance counters to work under limited users on XP x64? If so - how'd you get it to work?

A couple of notes:

  • I can't modify the registry
  • I can't accept the restriction that users must be in the "Performance Monitors" user group

Like I said, the app runs fine on XP (x86), Vista (x86/64), 7 (x86/64) -- so I'm not sure why XP x64 is being so picky....

All help is appreciated.

Thanks,

Dan

Edit:

Here's the line that fails:

c = new PerformanceCounter("Processor", "% Processor Time", "_Total", true);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜