PDA

Click to See Complete Forum and Search --> : API launch of application


DHill
Oct 18th, 2000, 10:34 AM
I have used the standard api call for launching an exe. This api waits for the launched application to close before continuing. I have tried this two different ways.
1. The calling program is freezes until the launched application closes.

2. The calling program continues to function but holds in a do loop until the launched application closes.

The second approach is nicer and is really what I need but I have found a problem.

When this code is run in windows 95 everything is fine, however if the same code is run under NT then the launched application runs extremely slowly. Checking the NT task manager it appears that although I launch the application with the necessary focus its share of the CPU time is severely limited by the calling program cycling through the do loop.

Is this something to do with NT being truly multi-tasking and 95 only giving that impression??

Does anyone have any suggestions??

PaulLewis
Oct 18th, 2000, 09:20 PM
On my NT system , I have no problems with the WaitForSingleObject or WaitForMultipleObjects calls (with a reasonable timeout).

In fact, it performfs very nicely with no CPU usage at all until the child notifies the parent. Admittedly though, I had a long timeout since it was only a test app involving a client & server "chat" app.