1. They are documented here:
https://msdn.microsoft.com/en-us/lib...(v=vs.85).aspx You should use DEFAULT_ERROR_MODE. You dont need DETACHED_PROCESS
2. Yes that's fine
3. Yes the point of using CreateProcessW is that it uses the unicode windows API which passes all data between the system and the application in utf-16 encoding, regardless of the codepage that windows itself uses
4. Lets cross that bridge when you come to it. Basically the easiest way would be to simply redirect the stdout/stderr of the process to a file. Then after the process finishes read the contents of the file.