static extern bool GetProcessHandleCount(IntPtr hProcess, ref UInt32 dwHandleCount);
GetProcessHandleCount(Process.GetCurrentProcess().Handle, ref handles);