I understand that the answer to this question may depend on registry settings and on the version of Windows, and perhaps on the amount of RAM if there is not enough memory. For
The desktop heap, which is a pool of memory where the real "stuff" the handle represents lives. It's sometimes not so much how many handles you have allocated but how much memory each object under that handle is using. You can debug the heap this way. It is a pain to install.
(this was recycled from another one of my answers)