Home > Articles > Operating Systems, Server > Microsoft Servers

  • Print
  • + Share This
This chapter is from the book

Process Handle Counts

A common programming error is to neglect to close handles when they are no longer needed; this can result in resource leakage, which in turn can degrade performance, cause program failures, and even impact other processes. NT 5.1 added a new function that allows you to determine how many handles any process has open. In this way, you can monitor your own process or other processes.

Here is the function definition, which is self-explanatory:

BOOL GetProcessHandleCount (
   HANDLE hProcess,
   PDWORD pdwHandleCount)
  • + Share This
  • 🔖 Save To Your Account