Board index » cppbuilder » Running out of system resources when running DOS programs

Running out of system resources when running DOS programs

I have the following problem with my C++ Builder application:

The application opens a DOS box to start a DOS program. The
application doesn't do this once, but has to do it theoretically
several hundreds of times.
At about 700 times opening and closing a DOS box an error
occurs: "There are not enough system resources to run this program".

We used the spawn function to start the DOS program.

When  you are running a MS-Office program (Word, Excel) the
problem doesn't occur.

Does anybody knows how this could happen and what can be done
about it (with maybe a Win32 API call)?

Thanks in advance!

 

Re:Running out of system resources when running DOS programs


The problem is more than likely a memory leak. Is it possible that office is
loading up a newer dll that fixes the problem? There used to be a problem
similar to this in ie3, after browsing (ex. chatting - changing pages) a lot
you would end up with low resources.

Quote
Thomas Middelkoop <thomas.middelk...@cmg.nl> wrote in message

news:7peh1r$27i2@forums.borland.com...
Quote
> I have the following problem with my C++ Builder application:

> The application opens a DOS box to start a DOS program. The
> application doesn't do this once, but has to do it theoretically
> several hundreds of times.
> At about 700 times opening and closing a DOS box an error
> occurs: "There are not enough system resources to run this program".

> We used the spawn function to start the DOS program.

> When  you are running a MS-Office program (Word, Excel) the
> problem doesn't occur.

> Does anybody knows how this could happen and what can be done
> about it (with maybe a Win32 API call)?

> Thanks in advance!

Re:Running out of system resources when running DOS programs


Hey

 maybe its because MS-DOS programs cannot get WM_CLOSE mesage, so you
terminated them by force. this means no cleanup.

on what OS?
use the "resource meter" to find what resource is missing.

have you tried a diffrent DOS program? a "main(){return 0;}" one?

Asaf Shelly Israel

Quote
Thomas Middelkoop wrote:
> I have the following problem with my C++ Builder application:

> The application opens a DOS box to start a DOS program. The
> application doesn't do this once, but has to do it theoretically
> several hundreds of times.
> At about 700 times opening and closing a DOS box an error
> occurs: "There are not enough system resources to run this program".

> We used the spawn function to start the DOS program.

> When  you are running a MS-Office program (Word, Excel) the
> problem doesn't occur.

> Does anybody knows how this could happen and what can be done
> about it (with maybe a Win32 API call)?

> Thanks in advance!

Re:Running out of system resources when running DOS programs


On Wed, 18 Aug 1999 16:54:45 +0200, "Thomas Middelkoop"

Quote
<thomas.middelk...@cmg.nl> wrote:
>At about 700 times opening and closing a DOS box an error
>occurs: "There are not enough system resources to run this program".

How are you starting the DOS session?  CreateProcess?  Are you freeing
the handles?

Daniel J. Wojcik
****************
We're down on our knees and we've nothing to say
Nothing to say
Nothing to say...

http://www.genjerdan.com
programming, and other things best done in private

Re:Running out of system resources when running DOS programs


: "Thomas Middelkoop" <thomas.middelk...@cmg.nl> wrote:

Quote
>I have the following problem with my C++ Builder application:

Thomas, please do NOT cross- or multi-post; people are not really fond of
this and it leads to all sorts of inefficiencies and confusion - major
problems, in other words.

The newsgroups guidelines (see http://www.borland.com/newsgroups/)
specifically mention this case; you might want to check them out.

Please note that if there hadn't been responses to this thread already, I
would have cancelled (deleted) your message due to a gross violation of
the newsgroup guidelines immediately.

Followup-to is set to borland.public.cppbuilder.winapi, where you might
want to post your 10-15 lines of your code which probably leaks process
and/or thread handles.

Thank you for your co-operation in the future.

--
Stefan Hoffmeister (TeamB)     http://www.econos.de/
Please do apply judgement when sending email.

Other Threads