0

I am writing a small system information application in C#. I want to display (Handle#1 @ 0x12345, ...) all handles my process currently has opened. The Process class offers a method to get the total count of handles but (I think) no way to iterate through them.

var process = Process.GetCurrentProcess();
var count = process.HandleCount;
Console.WriteLine($"HandleCount: {count}");
var handle1 = process.Handles[1]; // not available

Once I have the process handle count how can I iterate through them?

Donald
  • 63
  • 1
  • 5

0 Answers0