[Wine] CreateProcess and redirected stdout from Linux apps?

dirkgently wineforum-user at winehq.org
Wed Apr 29 19:04:51 CDT 2009


I'm using Wine 1.0.1. I have a Win32 application that uses ShellExecute in some places and CreateProcess in others to execute batch files and executables. Under both Windows XP and Wine, both ShellExecute and CreateProcess  execute their executables successfully. 

However, when using CreateProcess on Windows the output of batch files or console apps is redirected and displayed in a text box in the GUI. When doing the same thing under Wine, it'll work if Wine executes Win32 executables but not if a shell script or other Linux app is executed. The code using CreateProcess is implemented much like this MSDN example:

http://msdn.microsoft.com/en-us/library/ms682499.aspx

Is it possible to capture stdout and stderr from Linux apps that are invoked via CreateProcess from Wine? If so, what can I do differently to make it work? If not I suppose a workaround will be to have the application detect that it's running under Wine and invoke XTerm or similar with the application as a parameter.







More information about the wine-users mailing list