Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Free some GDI Handlers
Message
From
06/12/2011 15:50:17
 
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2008
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Desktop
Miscellaneous
Thread ID:
01530443
Message ID:
01530469
Views:
88
>Is there a way to free some of GDI resources used?
>
>I saw that when I generate a huge number of pages the Application exceed the defined GDI handlers(10000).
>This is a payroll statements generation utility and it generates more than 4000 PDFs (using XFRX) and send them by email.
>but after 1500th PDF the system crashed :-)
>Is there some API function like GetGuiResources() but SETGuiResources() :-))))
>
>
>I don't want to do anything with the Windows Registry. I know that there is a way to increase GDI handlers with Registry, but as I said, i don't want to manipulate them.
>
>TIA

Hi Boris,

Interesting to say that I'm working on this subject right now in FoxyPreviewer.


Not that I'm aware of. See below what Lisa Slater Nicholls says about this - she recommends using the "PageLimit" property:
http://spacefold.com/articles/tmm/_ReportListener.aspx

"PageLimit" - Property - Default -1

When set to a value > 0, represents the highest number of pages allowed in a report run (potentially across multiple reports that have been run with the NOPAGEEJECT clause).

Remarks: The pageLimit set of properties complement the SP1 product change to handle GDI handle resources more gracefully. Since the overall limit cannot be predicted, and varies by operating system, registry key values, as well as other programs in use on the client system, the FFC reportlisteners provides some enhanced handling of a limited set of pages from the report set. You can provide an overall pagelimit for safety, using this property, or use the accompanying properties to "fine tune" a preview of a report run before final printing.

Although this behavior exists primarily to protect ListenerTypes 1 and 3, you can tune these values and use them for any listener and output types.


Another important input comes from Tom Borgman's post here:
He suggests controlling the Gdi resources, and stop the report before it exceeds the limit of resources available in ther machine
http://social.msdn.microsoft.com/Forums/en/visualfoxprogeneral/thread/2d05fb3e-cae8-47de-b344-02721f5d3c6d


And if you're willing to change the registry to expand the limits:
http://msdn.microsoft.com/en-us/library/ms724291(VS.85).aspx

HTH

Cesar
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform