All,

I have created a custom performance category thus:-

VB Code:
  1. Dim CounterDataCollection As New CounterCreationDataCollection()
  2. '\\ Create the counters and set their properties.
  3. Dim cdCounterTotal As New CounterCreationData()
  4. Dim cdCounterEMF As New CounterCreationData()
  5. cdCounterTotal.CounterName = "Spool files read"
  6. cdCounterTotal.CounterHelp = "Total spool files read"
  7. cdCounterTotal.CounterType = PerformanceCounterType.NumberOfItems64
  8. cdCounterEMF.CounterName = "EMF Spool files read"
  9. cdCounterEMF.CounterHelp = "Total EMF spool files read"
  10. cdCounterEMF.CounterType = PerformanceCounterType.NumberOfItems64
  11. '\\ Add both counters to the collection.
  12. CounterDataCollection.Add(cdCounterTotal)
  13. CounterDataCollection.Add(cdCounterEMF)
  14. '\\ Create the category and pass the collection to it.
  15. PerformanceCounterCategory.Create( _
  16. "Spoolfile reader", "Printer spoolfile reading perdormance",
  17. CounterDataCollection )

How do I now send data to these performance counters?...i.e. how do I create a new PerformanceCounter object refering to these counters?

Thanks in advance,
Duncan