I have a win32 application (call it wrapper) which, as part of its duties, launches another application (.net - call it child) and captures its output by redirecting the stdout of child to its own stdout.
This works fine from the console.
However, if wrapper is launched periodically by a .net windows service, wrapper runs just fine but child fails to run. There is no .Net stack trace in the windows event viewer and the process exit code returned from child is 0xC06D007E, which equates to "Unknown Software Exception."
If I replace child with a win32 application, it launches, but there seems to be an encoding mismatch because the output gets turned into a bunch of missing glyphs. But at least the application runs and returns exit code 0 in that case.
So I have two problems, here:
Here's a link to the wrapper application source code: http://pastebin.com/akgaR090
The source code of child is irrelevant, as a hello world application is sufficient to demonstrate the behavior.
The .net service is calling the wrapper application with this code: http://pastebin.com/k0DYMB1f
Child source code sufficient to replicate the issue:
public class Child
{
public int Main(string[] args)
{
}
}
User contributions licensed under CC BY-SA 3.0