How to increase the maximum amount of GDI Object for Windows 10?

15,304

Solution 1

You are able to change the limit on current versions of Windows 10 (tested on 1803, 1809, 1903, 1909 and 2004)

For GDI handles change this Registry Key:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Windows\GDIProcessHandleQuota

Range: 256 - 65,536. Default value: 10000

For USER handles change this Registry Key:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Windows\USERProcessHandleQuota

Range: 200 - 18,000. Default value: 10000


Remember to reboot for the changes to take effect.

Solution 2

You have to reboot Windows 10 for this registry setting to take effect. Also be aware that on x64 there are two GDIProcessHandleQuota values in the registry.

Share:
15,304
Stefan Hinkel
Author by

Stefan Hinkel

Updated on June 04, 2022

Comments

  • Stefan Hinkel
    Stefan Hinkel about 2 years

    Searching the web and not finding a sufficient answer I have to ask again: Is there any way to increase the maximum amount of GDI Objects for Windows 10?

    The application i'm using is written in VB6 with some third party controls (leaks from the controls are possible) and it uses a lot of child windows for displaying data across the app.

    Edit: The Application itself is designed to create multiple intances of very large user controls. Each control contains a heavily modified third party grid, toolbars and windows forms. The forms themselves can open different user controls (with grids, toolbars and forms) and so on. Therefore large numbers of handles are created. We always hunt for leaks and fix them immediately but unfortunately not everything is a leak but a side effect of the application design (which was made before my time).

    I tried several things, from increasing the registry values under

    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Windows\GDIProcessHandleQuota]

    [HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows NT\CurrentVersion\Windows\GDIProcessHandleQuota]

    to increasing the desktop heap but nothing takes effect. Even after a restart the limit is still 10000 handles.

    It seems like there is a static value somewhere hidden inside windows or the registry which overwrites the value because even lowering the value does not affect the limit of 10000 handles.

    Thanks in advance!