On Thu, Apr 24, 2008 at 11:12 AM, Alexandre Julliard julliard@winehq.org wrote:
It depends which cases you are trying to catch, but for the case of users starting an app from their desktop, you could probably do it in start.exe.
As per our discussion on IRC, start uses CreateProcess which according to Raymond and my own testing does not wait around and return anything of any meaning, see
http://blogs.msdn.com/oldnewthing/archive/2005/01/19/356048.aspx
So checking the return value and doing something like
WINE_ERR("start failed, error %d\n", GetLastError());
does not even work, let alone because if it finds the EXE there is no error as far as CreateProcess cares. On the other had, The child process returns an exit code such as STATUS_ENTRYPOINT_NOT_FOUND but I don't see how to get this information from the parent process, return it to start.exe.so and have start do something like print an error or display a message box. Can anyone lurking point me to an example of how to get the child's return value and pass that back to the parent?
Thanks