Solved

A Win32 API function failed

Posted on 1999-01-21
7
2,241 Views
Last Modified: 2012-08-14
Help! I use Delphi 3 enterprise edition. I have an app that can not be run from the IDE. It has to do with memory. The IDE leaks like a sieve after running for a while. I get the error sometimes when I'm trying to alter a graph object. Sometimes the system will get so low on resources that it will lock up my system and I have to hard boot my system. My question is this: Is there a way to increase the memory the IDE allocates for running apps? Has anyone run into this problem? How did you fix this?
0
Comment
Question by:evansj
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
7 Comments
 
LVL 12

Expert Comment

by:rwilson032697
ID: 1362748
Are you sure it is the IDE, and not your own code that is leaking?

Cheers,

Raymond.
0
 

Author Comment

by:evansj
ID: 1362749
Oh, BTW, the app is a database app running under BDE 5.0.
It runs on a P2-300MHZ machine w/64Meg of RAM. I run the BDE off a Novell Network (Netware 4+). I also run VShield, Office Bar, and tape scheduler. So I have removed every thing from memory I could, closed everything I could, and I still get the error when opening certain forms.
0
 
LVL 12

Accepted Solution

by:
rwilson032697 earned 100 total points
ID: 1362750
OK - some more comments (actually I'll make it an answer...):

You say it is getting low on resources - do you mean resources like window handles? This is a separate issue from low memory. To minimise the amount of resources your app uses here are some tips:

1. Don't autocreate all your forms. Create a form when it is required and destroy it (either by setting Action := caFree in the OnClose or using MyForm.Release).

2. Don't create lots of bitmaps. These suck up handles quickly. See if you can use a TImageList to manage large numbers of same sized and colour depth bitmaps.

3. Make sure you don't hold on to resources such as bitmaps, fonts, brushes etc after you have finished using them.

Delphi doesn't allocate any amount of memory to an app to run in. This is what the OS does. The app is quite free to use all the virtual memory available to the system.

Cheers,

Raymond.

0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:evansj
ID: 1362751
I have considered this but I have opened the IDE with another delphi app already open and had it go boom without even attempting to run the app. We have several Delphi apps. Depending on which one is open, the IDE sometimes won't open with the app. I have the IDE set up to open with the last app worked. Also, this may be a Win95 thing, but I have opened the IDE and checked the resources. Worked in the IDE and rechecked the resources. Serious use of the resources, typically 3-6% resources left after being in the IDE a while.
0
 

Author Comment

by:evansj
ID: 1362752
I'm sorry Delphi.
0
 
LVL 12

Expert Comment

by:rwilson032697
ID: 1362753
The IDE itself is going to need to use resources. If there are not enough available then it won't run.

NT is a completely different story as its resource limitations are much, much higher than Win95's and is a much better platform to do the development on...

Cheers,

Raymond.
0
 
LVL 13

Expert Comment

by:Mirkwood
ID: 1362754
Bought This Question.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

740 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question