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

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Francois Piette (francois.piette_at_overbyte.be)
Date: 03/04/04


Date: Thu, 4 Mar 2004 13:20:20 +0100


> Fix your program so that it doesn't overflow the message queue. You
can
> either use PeekMessage to pump messages interleaved with whatever
processing

The problem is _not_ the message queue overflow.
The problem is the limit of 10000 that windows impose on the number of
window handles.

--
francois.piette@overbyte.be
Author of ICS (Internet Component Suite, freeware)
Author of MidWare (Multi-tier framework, freeware)
http://www.overbyte.be
"Gary Chanson" <gchanson@No.Spam.TheWorld.net> a écrit dans le message de
news:%238TFwfdAEHA.916@TK2MSFTNGP10.phx.gbl...
>
> "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: Thanks for your links!
    ... Is there a way to prevent "PeekMessage" from dispatch sent messages that come from others threads? ... I'm writing an application where Windows messages are used in a special ... manner and want to clarify how flexible is access to the thread message queue. ... doesn't care if was sent view SendMessage or PostMessage. ...
    (microsoft.public.vc.mfc)
  • Re: [Full-Disclosure] Exploit code Available for previously announced MS Vulnerabilities
    ... Microsoft Windows Metafile Heap Overflow ... > Do You Yahoo!? ...
    (Full-Disclosure)
  • [Full-Disclosure] (no subject)
    ... We checked both EMF and WMF files out and changed around the sizes and it ... did not crash Windows XP ... Windows XP explorer.exe heap overflow. ...
    (Full-Disclosure)
  • [Full-Disclosure] Re: Windows XP explorer.exe heap overflow.
    ... We checked both EMF and WMF files out and changed around the sizes and it ... did not crash Windows XP ... Windows XP explorer.exe heap overflow. ...
    (Full-Disclosure)
  • Re: linux to windows porting help
    ... Presently i am working on win32 console applications. ... PostThreadMessage - for Message queue between process and its ... donn have any windows handle so unable to use these functions... ...
    (comp.programming)