Starting a 16-bit process on Win95

I want to start a 16-bit process froma 32-bit application and then wait for that process to finish.
On NT it works perfectly as I am using CreateProcess with a CREATE_SEPARATE_WOW_VDM flag for process creation. However this flag is not valid on 95.
Followed by this I call WaitForSingleObject in order to wait for the 16-bit process to finish.
Now, if I dont ise CREATE_SEPARATE_WOW_VDM on NT this WaitForSingleObject returns immidiaely as the new process is spawned in 16-bit shared VDM.
So this problem is solved by CRAETE_SEPARATE_WOW_VDM on NT.

I will describe the scenario on win 95 in more detail.

1. I call CreateProcess to run a batch file (16-bit app)
2. This execution starts another process 'WINOLDAP'.
3. Even after all the execution in the batch file is complete this process does not shut down.
4. Because of this I do not get response for WaitForSingleObject which finally terminates on a time-out signal.

So how do I get rid of this WINOLDAP?

Thnx
unmeshvAsked:
Who is Participating?
 
BonevConnect With a Mentor Commented:
Are you going to give me the points?
0
 
unmeshvAuthor Commented:
Edited text of question
0
 
BonevCommented:
I think that the process in Win95 is pretty much the same as in NT. I don't have any problems using WaitForSingleObject under 95.
0
2018 Annual Membership Survey

Here at Experts Exchange, we strive to give members the best experience. Help us improve the site by taking this survey today! (Bonus: Be entered to win a great tech prize for participating!)

 
unmeshvAuthor Commented:
Edited text of question
0
 
unmeshvAuthor Commented:
Adjusted points to 100
0
 
BonevCommented:
Do you really need to call a batch file?
If no, WaitForSingleObject will work for you.
If yes, write a small program that executes COMMAND.COM /C <batch-file-name> and wait for its termination.
0
 
unmeshvAuthor Commented:
Thanks. That olves the problem. I have to use batch file. So the second option wotks correctly. Thanks again.
0
All Courses

From novice to tech pro — start learning today.