Link to home
Start Free TrialLog in
Avatar of Gamba
Gamba

asked on

WaitForSingleObject and DOS-Windows in Win98

I'm trying to start a DOS-Application under Win98
from Delphi with CreateProcess.
Further on I want to wait for the end of the
execution, using WaitForSingleObject.

The problem is, that DOS-applications as default
do not automatically close the DOS-window when
finished. So I have to close the window manually,
to make WaitForSingleObject detect the end of
the execution.

I used sw_hide - option to prevent from displaying
the DOS-window, but this does not help.

For normal applications the property can be set manally
with applications file|properties ..close.. (don't know the exact name in the english version...).

Can I simply change the default options for DOS-windows,
or can I use CreateProcess with special options to
close after execution end??


Thanks for help,

Gamba

ASKER CERTIFIED SOLUTION
Avatar of gd2000
gd2000

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Gamba
Gamba

ASKER

Great, this works!!!

Thank you,

Gamba