Board index » delphi » HELP - A WIN32 API FUNCTION FAILED

HELP - A WIN32 API FUNCTION FAILED

I create a application that run in my machine and in another machine too.,..

but when I install this application in my client machine and run occurs "A
win32 api function failed".

Note:
my application create the Tedits, TRadioGroup, TCheckBox .....and so so in
runtime...

I think that this is related with "out of resources" of my client
machines...

how can I solve this problem ????

Please Help me

            Thanks advance
                            lucian...@com4.com.br
                            ICQ : 132.928.345

 

Re:HELP - A WIN32 API FUNCTION FAILED


Quote
In article <3d3ebedb_1@dnews>, Lucianods wrote:
> I create a application that run in my machine and in another machine too.,..
> but when I install this application in my client machine and run occurs "A
> win32 api function failed".

On Win9x i assume?

Quote
> how can I solve this problem ????

The first thing to do would be to verify that it is indeed a resource problem
you are facing. Run the program together with the Windows resource monitor
application (resmon.exe). Check how GDI and USER resource behave.

If this is indeed a resource problem there is no other way than to reduce the
resource requirements of the application.

 - Do not autocreate your forms, with the exception of the main form. All
other forms (at least the ones only used modally) should be created as needed
and destroyed when no longer needed.

 - Try to replace controls that use Window handles with TGraphicControl
descendents, e.g. TPanels and TGroupboxes by TBevels. TGraphicControl do not
use window handles.

 - If you use pagecontrols a lot you can save resources by destroying the
window handles of controls on hidden pages of the notebook, using the
tabsheets DestroyHandle method.

 - Replace groups of Tedit controls with a TStringgrid, a grid uses only two
window handles, regardless how many cells it has.

--
Peter Below (TeamB)  
Use the newsgroup archives :
http://www.mers.com/searchsite.html
http://www.tamaracka.com/search.htm
http://groups.google.com
http://www.prolix.be

Re:HELP - A WIN32 API FUNCTION FAILED


First of all ... thanks for your answer.
In my Application the user can add all fields that think necessary...
in this case, user add 270 fields.... (it's a researching program)

In Win NT SP6  and WIN XP, program run normaly,
exists any service pack (patch) to win 9x ????
I hope Yes ....
 thanks again ....
            lucian...@com4.com.br
            icq : 132.928.345

Peter Below (TeamB) <100113.1...@compuXXserve.com> escreveu nas notcias de
mensagem:VA.00008fae.003d2...@antispam.compuserve.com...

Quote
> In article <3d3ebedb_1@dnews>, Lucianods wrote:
> > I create a application that run in my machine and in another machine
too.,..
> > but when I install this application in my client machine and run occurs
"A
> > win32 api function failed".

> On Win9x i assume?

> > how can I solve this problem ????

> The first thing to do would be to verify that it is indeed a resource
problem
> you are facing. Run the program together with the Windows resource monitor
> application (resmon.exe). Check how GDI and USER resource behave.

> If this is indeed a resource problem there is no other way than to reduce
the
> resource requirements of the application.

>  - Do not autocreate your forms, with the exception of the main form. All
> other forms (at least the ones only used modally) should be created as
needed
> and destroyed when no longer needed.

>  - Try to replace controls that use Window handles with TGraphicControl
> descendents, e.g. TPanels and TGroupboxes by TBevels. TGraphicControl do
not
> use window handles.

>  - If you use pagecontrols a lot you can save resources by destroying the
> window handles of controls on hidden pages of the notebook, using the
> tabsheets DestroyHandle method.

>  - Replace groups of Tedit controls with a TStringgrid, a grid uses only
two
> window handles, regardless how many cells it has.

> --
> Peter Below (TeamB)
> Use the newsgroup archives :
> http://www.mers.com/searchsite.html
> http://www.tamaracka.com/search.htm
> http://groups.google.com
> http://www.prolix.be

Re:HELP - A WIN32 API FUNCTION FAILED


Quote
In article <3d4107f2_1@dnews>, Lucianods wrote:
> First of all ... thanks for your answer.
> In my Application the user can add all fields that think necessary...
> in this case, user add 270 fields.... (it's a researching program)

> In Win NT SP6  and WIN XP, program run normaly,
> exists any service pack (patch) to win 9x ????

This is simply a system limitation on Win9x and it is caused by the fact that
much of the OS kernel code is still 16 bit on these platforms. So this cannot
be fixed by a service pack. If you cannot redesign your application to require
less resources you will have to tell your users that it requires NT/2K/XP to
run.

--
Peter Below (TeamB)  
Use the newsgroup archives :
http://www.mers.com/searchsite.html
http://www.tamaracka.com/search.htm
http://groups.google.com
http://www.prolix.be

Re:HELP - A WIN32 API FUNCTION FAILED


On Fri, 26 Jul 2002 05:30:32 +0100, "lucianods"

Quote
<lucian...@com4.com.br> wrote:
>In Win NT SP6  and WIN XP, program run normaly,
>exists any service pack (patch) to win 9x ????
>I hope Yes ....
> thanks again ....

     Yeah--it's called NT or 2000 or XP.

     There is no other fix, there will be no other fix, there can be
no other fix--it's simply too deep into Windows.  Furthermore,
changing it would break some existing programs.

Other Threads