https://bugs.winehq.org/show_bug.cgi?id=49079
Bug ID: 49079 Summary: Multiple applications want support for CREATE_NO_WINDOW flag (0x08000000) in CreateProcess Product: Wine Version: 5.7 Hardware: x86-64 OS: Linux Status: NEW Severity: minor Priority: P2 Component: kernelbase Assignee: wine-bugs@winehq.org Reporter: focht@gmx.net Distribution: ---
Hello folks,
found while investigating bug 49078
Not really needed for getting the to app work but I think it's still worth to keep track of for later as real-world test case.
You need to work around bug 49076 ("Sennheiser Wireless Systems Manager 4.4 installer overwrites Wine builtin "system/os" dlls, causing broken WINEPREFIX (SfcIsFileProtected is a stub)") to fix the WINEPREFIX after installation.
Download:
https://web.archive.org/web/20200502103749/http://sennheiser-sites.com/respo...
Prerequisite: 'winetricks -q dotnet45'
--- snip --- $ pwd /home/focht/.wine/drive_c/Program Files (x86)/Sennheiser/Wireless Systems Manager
$ WINEDEBUG=+seh,+relay,+loaddll,+process,+secur32,+ntlm wine ./WSM.exe
log.txt 2>&1
... 00c8:Call KERNEL32.CreateProcessW(00000000,03ece868 L""C:\Program Files (x86)\Sennheiser\Wireless Systems Manager\WSMServerBinaries\WSM.Server.exe" ",00000000,00000000,00000001,08000400,00000000,00000000,0031f7f4,03ecbc10) ret=6711d6b5 ... 00c8:warn:process:CreateProcessInternalW (L"C:\Program Files (x86)\Sennheiser\Wireless Systems Manager\WSMServerBinaries\WSM.Server.exe",...): ignoring some flags in 8000400 ... 00c8:trace:process:CreateProcessInternalW started process pid 00e4 tid 00e8 ... 00c8:Ret KERNEL32.CreateProcessW() retval=00000001 ret=6711d6b5 ... --- snip ---
The process is a console app:
--- snip --- $ pwd /home/focht/.wine/drive_c/Program Files (x86)/Sennheiser/Wireless Systems Manager/WSMServerBinaries
$ winedump WSM.Server.exe Contents of WSM.Server.exe: 8704 bytes
File Header Machine: 014C (i386) Number of Sections: 3 TimeDateStamp: 5DF710AF (Mon Dec 16 06:05:51 2019) offset 136 PointerToSymbolTable: 00000000 NumberOfSymbols: 00000000 SizeOfOptionalHeader: 00E0 Characteristics: 0022 EXECUTABLE_IMAGE LARGE_ADDRESS_AWARE
Optional Header (32bit) Magic 0x10B 267 linker version 48.00 size of code 0xc00 3072 size of initialized data 0x1400 5120 size of uninitialized data 0x0 0 entrypoint RVA 0x2aa6 10918 base of code 0x2000 8192 base of data 0x4000 16384 image base 0x400000 4194304 section align 0x2000 8192 file align 0x200 512 required OS version 4.00 image version 0.00 subsystem version 6.00 Win32 Version 0x0 0 size of image 0x8000 32768 size of headers 0x200 512 checksum 0x0 0 Subsystem 0x3 (Windows CUI) DLL characteristics: 0x8560 DYNAMIC_BASE NX_COMPAT NO_SEH TERMINAL_SERVER_AWARE stack reserve size 0x100000 1048576 stack commit size 0x1000 4096 heap reserve size 0x100000 1048576 heap commit size 0x1000 4096 loader flags 0x0 0 RVAs & sizes 0x10 16
Data Directory EXPORT rva: 0x0 size: 0x0 IMPORT rva: 0x2a54 size: 0x4f RESOURCE rva: 0x4000 size: 0x1148 EXCEPTION rva: 0x0 size: 0x0 SECURITY rva: 0x0 size: 0x0 BASERELOC rva: 0x6000 size: 0xc DEBUG rva: 0x0 size: 0x0 ARCHITECTURE rva: 0x0 size: 0x0 GLOBALPTR rva: 0x0 size: 0x0 TLS rva: 0x0 size: 0x0 LOAD_CONFIG rva: 0x0 size: 0x0 Bound IAT rva: 0x0 size: 0x0 IAT rva: 0x2000 size: 0x8 Delay IAT rva: 0x0 size: 0x0 CLR Header rva: 0x2008 size: 0x48 rva: 0x0 size: 0x0
Done dumping WSM.Server.exe --- snip ---
Microsoft docs:
https://docs.microsoft.com/en-us/windows/win32/procthread/process-creation-f...
--- quote --- CREATE_NO_WINDOW 0x08000000
The process is a console application that is being run without a console window. Therefore, the console handle for the application is not set. This flag is ignored if the application is not a console application, or if it is used with either CREATE_NEW_CONSOLE or DETACHED_PROCESS. --- quote ---
Also found this document which contains some interesting tidbits:
https://github.com/rprichard/win32-console-docs/blob/master/README.md
Wine source:
https://source.winehq.org/git/wine.git/blob/d1f858e03da732c621504f90e349d517...
--- snip --- 432 /********************************************************************** 433 * CreateProcessInternalW (kernelbase.@) 434 */ 435 BOOL WINAPI DECLSPEC_HOTPATCH CreateProcessInternalW( HANDLE token, const WCHAR *app_name, WCHAR *cmd_line, 436 SECURITY_ATTRIBUTES *process_attr, 437 SECURITY_ATTRIBUTES *thread_attr, 438 BOOL inherit, DWORD flags, void *env, 439 const WCHAR *cur_dir, STARTUPINFOW *startup_info, 440 PROCESS_INFORMATION *info, HANDLE *new_token ) 441 { 442 WCHAR name[MAX_PATH]; 443 WCHAR *p, *tidy_cmdline = cmd_line; 444 RTL_USER_PROCESS_PARAMETERS *params = NULL; 445 RTL_USER_PROCESS_INFORMATION rtl_info; 446 HANDLE parent = NULL; 447 NTSTATUS status; ... 471 /* Warn if unsupported features are used */ 472 473 if (flags & (IDLE_PRIORITY_CLASS | HIGH_PRIORITY_CLASS | REALTIME_PRIORITY_CLASS | 474 CREATE_DEFAULT_ERROR_MODE | CREATE_NO_WINDOW | 475 PROFILE_USER | PROFILE_KERNEL | PROFILE_SERVER)) 476 WARN( "(%s,...): ignoring some flags in %x\n", debugstr_w(app_name), flags ); ... --- snip ---
$ sha1sum Sennheiser_WSM_Setup_4.4.6.6.exe be82329265ce8fca79334612007ea9b1f894bf8f Sennheiser_WSM_Setup_4.4.6.6.exe
$ du -sh Sennheiser_WSM_Setup_4.4.6.6.exe 122M Sennheiser_WSM_Setup_4.4.6.6.exe
$ wine --version wine-5.7-177-gad1fad8a94
Regards
https://bugs.winehq.org/show_bug.cgi?id=49079
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- URL| |https://web.archive.org/web | |/20200502103749/http://senn | |heiser-sites.com/responsive | |-manuals/WSM/Sennheiser_WSM | |_Setup_4.4.6.6.exe Keywords| |download
https://bugs.winehq.org/show_bug.cgi?id=49079
Zebediah Figura z.figura12@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Component|kernelbase |kernel32
https://bugs.winehq.org/show_bug.cgi?id=49079
Eric Pouech eric.pouech@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |eric.pouech@gmail.com
--- Comment #1 from Eric Pouech eric.pouech@gmail.com --- support CREATE_NO_WINDOW in create process has been added in b4d91adb16565c9d12a70cb29c2d25cdb3665488 (and some other subsequent patches)
retesting on wine 8.0 rc would be appreciated