Is it possible to launch an executable in code using something like CreateProcess, but to make my program wait and not continue until the launched program has closed and returned a value?

I need to launch another .exe and get it's return value when it closes without having to create a client/server type setup.

Cheers.