Hi Vincent,
On 17/04/2014 7:11 AM, Vincent Povirk wrote:
MSDN specifically mentions that this flag is the opposite of CREATE_NEW_CONSOLE: http://msdn.microsoft.com/en-us/library/windows/desktop/bb759784%28v=vs.85%2...
I also wrote a test program (built with -mconsole), which uses ShellExecuteEx to run cmd.exe. When running it from a command line on windows, it creates a new console window for cmd.exe only when SEE_MASK_NOCONSOLE is not in fMask. (If I compile with -mwindows, it seems to create a new console window regardless of the value of the flag or how I start it, which looks like another wine bug to me.)
I submitted a patch to do this but was reject since it causes the test to behave exactly like window. :(
Look for "Correct create flags when SEE_MASK_NO_CONSOLE isn't specified" in January 2014 mailing lists.
Best Regards Alistair Leslie-Hughes
I submitted a patch to do this but was reject since it causes the test to behave exactly like window. :(
Which test? And why is this a problem?
I submitted a patch to do this but was reject since it causes the test to behave exactly like window. :(
Look for "Correct create flags when SEE_MASK_NO_CONSOLE isn't specified" in January 2014 mailing lists.
There's no way around this.
We can have the tests call ShellExecuteEx with SEE_MASK_NO_CONSOLE, and that helps somewhat, but ShellExecute behaves as if SEE_MASK_NO_CONSOLE is omitted.
There's no way around this.
Spoke too soon. I'll get back to you after further investigation.
There's another Wine bug where invoking a .lnk file with SEE_MASK_NO_CONSOLE will create a console. That doesn't happen on Windows. I'll send a patch for that.
If I fix that bug and use SEE_MASK_NO_CONSOLE when calling ShellExecuteEx from the tests, I still get some console windows. If I also hack ShellExecuteA to use SEE_MASK_NO_CONSOLE, I don't get any console windows, but my testing on Windows has shown that to be incorrect. So, there are a few things I can do to mitigate this, and I will send patches for them, but I can't prevent all consoles from being created.
Hi Vincent,
On 18/04/2014 8:30 AM, Vincent Povirk wrote:
There's no way around this.
If I fix that bug and use SEE_MASK_NO_CONSOLE when calling ShellExecuteEx from the tests, I still get some console windows. If I also hack ShellExecuteA to use SEE_MASK_NO_CONSOLE, I don't get any console windows, but my testing on Windows has shown that to be incorrect. So, there are a few things I can do to mitigate this, and I will send patches for them, but I can't prevent all consoles from being created.
That's what I saw as well but didn't have time to completely test my solution.
Alistair.