The standard way to create a process, then wait for it is called shell and wait. Use CreateProcess and WaitForSingleObject.
Not shell & EnumWindows.

Here is the MSDN tutorial:

http://support.microsoft.com/default...;EN-US;q129796