Click here to Skip to main content
15,893,487 members
Home / Discussions / C#
   

C#

 
AnswerRe: How to make a button transparent? Pin
PandemoniumPasha18-May-07 0:30
PandemoniumPasha18-May-07 0:30 
GeneralRe: How to make a button transparent? Pin
long zihang8-Apr-12 23:42
long zihang8-Apr-12 23:42 
QuestionC# Programmme of Vocabulary Learning (involving 6 correct wordpairs, separated by '\t') Pin
Ntoki17-May-07 18:35
Ntoki17-May-07 18:35 
AnswerRe: C# Programmme of Vocabulary Learning (involving 6 correct wordpairs, separated by '\t') Pin
mav.northwind17-May-07 19:32
mav.northwind17-May-07 19:32 
QuestionExecuting Javascript in ASPX Pin
darora317-May-07 18:17
darora317-May-07 18:17 
AnswerRe: Executing Javascript in ASPX Pin
Sathesh Sakthivel17-May-07 18:37
Sathesh Sakthivel17-May-07 18:37 
GeneralRe: Executing Javascript in ASPX Pin
darora317-May-07 23:22
darora317-May-07 23:22 
QuestionMultiple Instance Performance Counter not working Pin
jchilberto17-May-07 18:05
jchilberto17-May-07 18:05 
Strange one for the experts.... I am using windows 2003, visual studio 2005

I can create and use a single instance performance counter without issue...sort of - will explain later.

I am not able to get a multiple instance performance counter to work. Ther performance counter is added but <no instances=""> are shown so I am not able ot select the performance counter to monitor. The code below that adds an instance runs without throwing an error.

The code:
if (!PerformanceCounterCategory.Exists("JUNK"))
{
CounterCreationData ccd = new CounterCreationData("numberOf", "numbers", PerformanceCounterType.NumberOfItems32);
CounterCreationDataCollection ccdc = new CounterCreationDataCollection(new CounterCreationData[] { ccd });

PerformanceCounterCategory cat = PerformanceCounterCategory.Create("JUNK", "junk category", PerformanceCounterCategoryType.MultiInstance, ccdc);

using (PerformanceCounter c = new PerformanceCounter("JUNK", "numberOf", "instance1", false))
{
c.RawValue = 10;
}
}

using (PerformanceCounter c1 = new PerformanceCounter("JUNK", "numberOf", "instance1", false))
{
for (int i = 0; i < 10; i++)
c1.Increment();
}

A single instance performance counter works but not as expected (the above code, but category marked as single instance and the instance not being specified when creating the counter). The counter is added and I can view in perfmon, but it is not until I have the counter added to perfmon that the incrementing is persisted.

Any ideas?


chilbert

AnswerRe: Multiple Instance Performance Counter not working Pin
jchilberto20-May-07 11:03
jchilberto20-May-07 11:03 
QuestionHelp with declaring variables (int vs float ) Pin
crash89317-May-07 15:39
crash89317-May-07 15:39 
AnswerRe: Help with declaring variables (int vs float ) Pin
Christian Graus17-May-07 15:42
protectorChristian Graus17-May-07 15:42 
AnswerRe: Help with declaring variables (int vs float ) Pin
Sathesh Sakthivel17-May-07 15:44
Sathesh Sakthivel17-May-07 15:44 
AnswerRe: Help with declaring variables (int vs float ) Pin
theney18-May-07 10:44
theney18-May-07 10:44 
QuestionEquation Editor Pin
hungvuong_hdu17-May-07 14:47
hungvuong_hdu17-May-07 14:47 
AnswerRe: Equation Editor Pin
Christian Graus17-May-07 15:53
protectorChristian Graus17-May-07 15:53 
GeneralRe: Equation Editor Pin
hungvuong_hdu17-May-07 16:26
hungvuong_hdu17-May-07 16:26 
QuestionHow To Force Webservice To Use Integrated Windows Authentication Pin
classNoob17-May-07 14:13
classNoob17-May-07 14:13 
AnswerRe: How To Force Webservice To Use Integrated Windows Authentication Pin
Sathesh Sakthivel17-May-07 15:09
Sathesh Sakthivel17-May-07 15:09 
GeneralRe: How To Force Webservice To Use Integrated Windows Authentication Pin
classNoob18-May-07 8:10
classNoob18-May-07 8:10 
Questionadding dropdownlist to a datagridview Pin
balanjingot17-May-07 14:10
balanjingot17-May-07 14:10 
AnswerRe: adding dropdownlist to a datagridview Pin
Sathesh Sakthivel17-May-07 15:05
Sathesh Sakthivel17-May-07 15:05 
Questionseek into .wmv file while recording? Pin
cjtaylor17-May-07 12:48
cjtaylor17-May-07 12:48 
AnswerRe: seek into .wmv file while recording? Pin
Christian Graus17-May-07 13:13
protectorChristian Graus17-May-07 13:13 
GeneralRe: seek into .wmv file while recording? Pin
Luc Pattyn17-May-07 13:35
sitebuilderLuc Pattyn17-May-07 13:35 
GeneralRe: seek into .wmv file while recording? Pin
Christian Graus17-May-07 13:51
protectorChristian Graus17-May-07 13:51 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.