Re: Maximum User Handles Per Process Is 10,000 in Windows 2000

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Gary Chanson (gchanson_at_No.Spam.TheWorld.net)
Date: 03/04/04


Date: Thu, 4 Mar 2004 05:58:48 -0500


"Francois Piette" <francois.piette@overbyte.be> wrote in message
news:40470a96$0$254$4d4efb8e@read.news.be.uu.net...
> I have a program that is impaired by the limit of 10000 window handles
> imposed by W2K. This program use hidden windows for message processing and
> stop working in high load because of this limit.
>
> This limit is known
(http://support.microsoft.com/default.aspx?kbid=326591)
> but can be changes with a registry key. Unfortunately this doesn't work on
> my Win-2K-Server-SP4 ! I have changed the limit from 10000 to 20000 in the
> keys:
> HKLM\Software\Microsoft\Windows
> NT\CurrentVersion\Windows\USERProcessHandleQuota
> and HKLM\Software\Microsoft\Windows
> NT\CurrentVersion\Windows\GDIProcessHandleQuota but this has no effect,
even
> after rebooting the server.
>
> What should I do ?

    Fix your program so that it doesn't overflow the message queue. You can
either use PeekMessage to pump messages interleaved with whatever processing
you're doing or better, use a separate thread for your processing so that
you can run a normal GetMessage based message pump. Don't tie up your
message pump thread by doing lengthy processing within message handlers.

-- 
-GJC [MS Windows SDK MVP]
-Software Consultant (Embedded systems and Real Time Controls)
- http://www.mvps.org/ArcaneIncantations/consulting.htm
-gchanson@mvps.org


Relevant Pages

  • Re: Pocket outlook - AppointmentsCollection class: ListChanged eve
    ... Visual Developer - Device Application Development MVP ... Chris Tacke, Embedded MVP ... Windows Messages. ... could put this code in a windows app but write you're own message pump ...
    (microsoft.public.dotnet.framework.compactframework)
  • Fishy Behavior when using Managed code in Unmanaged environment
    ... We have an MFC application that is compiled under VS 2003 (its a pure ... AND THEN we found this article on MSDN "Windows Forms and Unmanaged ... When you open a Windows Form from a COM client application, ... Is this message pump incompatibility the real reason for our keyboard ...
    (microsoft.public.dotnet.framework.interop)
  • Re: Pocket outlook - AppointmentsCollection class: ListChanged event
    ... It would be a good idea to know something about how a Windows program works ... or you need to build your own message pump. ... Thread timerThread = timer.Start; ... public void SleepIntermittently ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: FPC 2.0.2 Win32 Console Application and GetOpenFileName() Dialog
    ... I do have a Petzold Book (Programming Windows 3.1). ... the sections that explain about the message pump. ... control some of the behavior of the dialogbox while it is open. ... a parameter named message) and setfocus is a windows API function. ...
    (comp.lang.pascal.misc)
  • Re: BackgroundWorker Capability For Non UI Classes
    ... The main thread does have a UI, however the main message pump is a Visual ... however I was concerned that it wasn't a .NET message pump and the client ... BackgroundWorker doesn't require any control's to be created. ... I don't understand your worries about the windows forms dll. ...
    (microsoft.public.dotnet.framework.windowsforms)