Board index » delphi » exception class EOutofResources

exception class EOutofResources

Hi friends
I'm developing an application using Paradox tables, and sometimes when I
try to run
the app the next exception occurs:
Project name.exe raised exception class EOutOfResources with message
'parameter incorrect'.
Can some body tell me what kind of exception is this?

Thanks in advance
Dina.

 

Re:exception class EOutofResources


This may (or may not) help you:

From my book:

EOutOfResources
Possible Cause of Error
1. You may be (directly or indirectly) attempting to allocate a window
handle, but the maximum number of handles is already being used.
2. A Windows API function you directly or indirectly called may have failed.
3. Despite the message, there may be a bug in the video driver you are
using, especially if you are operating in high-color (32 KB or 64 KB colors)
mode.

Quick Fix
1. Keep the number of windowed controls (descendents of TWinControl) to a
minimum. Use graphical controls where possible (they do not require a
handle). Create as many forms as possible dynamically. See Dynamically
creating forms below.
2. Consult the Win32 help file (Win32.HLP) that ships with Delphi for
information on the particular API call. If that does not prove enlightening,
you might consider purchasing The Tomes of Delphi 3: Win32 Core API by John
Ayres, et al.
3. Switch to the standard Windows VGA driver, or to a less powerful mode of
your video driver. If you do not know how to do this, consult the Windows
documentation for instructions.

Additional Information
3. An example of this is a call to TWinControl's GetDeviceContext, which in
turn calls the Windows API function GetDC.

Tips for preserving resources:
Move as many forms as possible from the Auto-Create to the Available
(dynamic) list.
Where possible, use graphical components in place of windowed components.
Graphical components do not need a Windows handle. For example, if you want
to display a string of read-only text, use a TLabel as opposed to a TEdit
control.

Quote
"Dina Bojrquez" <L...@esmas.com> wrote in message

sometimes when I
Quote
> try to run
> the app the next exception occurs:
> Project name.exe raised exception class EOutOfResources

Other Threads