this could work:

1. execute your .exe
2. start a dll function that check if your .exe is open. if not it chages myVar
3. wait till myVar changed (in 3dGStudio) -> if it changes, the .exe is closed so continue




nipx