[Bug 49079] New: Multiple applications want support for CREATE_NO_WINDOW flag (0x08000000) in CreateProcess

WineHQ Bugzilla wine-bugs at winehq.org
Sat May 2 10:32:53 CDT 2020


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 at winehq.org
          Reporter: focht at 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/responsive-manuals/WSM/Sennheiser_WSM_Setup_4.4.6.6.exe

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-flags

--- 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/d1f858e03da732c621504f90e349d5170ca3336e:/dlls/kernelbase/process.c#l432

--- 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

-- 
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.



More information about the wine-bugs mailing list