If you would like to resolve GDI and USER handle issues I would recommend reading:
http://blogs.msdn.com/ntdebugging/archive/2007/01/04/desktop-heap-overview.aspx
The HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\SubSystems\Windows registry key contains the magic flags to resolve them. Setting the second parameter on the SharedSection argument to 12288 (12MB) will make the per session limits 12 instead of 3MB.
Since Windows Vista Servicepack 1 these settings are the new default.

