shell32/tests: Add traces to the WaitForInputIdle() hooking process.

Francois Gouget fgouget at codeweavers.com
Thu Jan 28 17:54:23 CST 2016


On Thu, 28 Jan 2016, Marvin wrote:
[...]
> === w1064 (32 bit shlexec) ===
> shlexec.c:2379: Test failed: failed: rc=29 err=2
> shlexec.c:2379: Test failed: failed: rc=29 err=2
> shlexec.c:2379: Test failed: failed: rc=29 err=2
> shlexec.c:2391: Test failed: ddeExec expected '[ifexec("C:\Users\winetest\AppData\Local\Temp\wt4CE4.tmp\test file.sde")]', got '[open("C:\Users\winetest\AppData\Local\Temp\wt4CE4.tmp\test file.sde")]'
> shlexec.c:2379: Test failed: failed: rc=29 err=2
> shlexec.c:2379: Test failed: failed: rc=29 err=2
> 
> === w1064 (64 bit shlexec) ===
> shlexec.c:2379: Test failed: failed: rc=29 err=2
> shlexec.c:2379: Test failed: failed: rc=29 err=2
> shlexec.c:2379: Test failed: failed: rc=29 err=2
> shlexec.c:2379: Test failed: failed: rc=29 err=2

These are the usual Windows 10 DDE ShellExecute() failures. What's 
interesting is that I think the extra traces point to the reason for 
these failures. Unfortunately I don't know how to fix it.

The extra traces (and a bit more) can be seen here:
https://testbot.winehq.org/JobDetails.pl?Key=20056&log_207=1#k207

* There is a set of traces showing WaitForInputIdle() being 
  replaced with our own implementation:
  shlexec.c:2318: Hooked USER32.dll.WaitForInputIdle

* And then traces showing our implementation being called:
  shlexec.c:2258: WaitForInputIdle() waiting for dde event

Except that on Windows 10 we never get the second set of traces which 
means we failed to override WaitForInputIdle().

Why override WaitForInputIdle()? Here it is from the source:

 * WaitForInputIdle() will normally return immediately for console apps. 
 * That's a problem for us because ShellExecute will assume that an app 
 * is ready to receive DDE messages after it has called
 * WaitForInputIdle() on that app. To work around that we install our 
 * own version of WaitForInputIdle() that will wait for the child to 
 * explicitly tell us that it is ready. We do that by changing the 
 * entry for WaitForInputIdle() in the shell32 import address table.


Does anyone know why hooking WaitForInputIdle() had no effect on Windows 10?

-- 
Francois Gouget <fgouget at codeweavers.com>



More information about the wine-devel mailing list