kernel32: Implement K32GetProcessImageFileNameA().

Francois Gouget fgouget at
Fri Aug 5 10:02:41 CDT 2011

On Fri, 5 Aug 2011, Marvin wrote:
> Full results can be found at
> === WVISTAADM (32 bit psapi_main) ===
> psapi_main.c:110: Test failed: cbNeeded=100

This got me looking into this test. It's a test of EnumProcessModules(). 
It's supposed to only return the 4 modules that psapi_crosstest is 
linked with: psapi_test.exe, ntdll.dll, kernel32.dll psapi.dll. On 
Windows there's two extra modules: msvcrt.dll and kernelbase.dll 
(probably brought in by kernel32.dll). So far so good.

But on the TestBot VMs there's a whole raft of extra dlls:

psapi_main.c:118: Test failed: cbNeeded=108
psapi_main.c:125: i=0 hmod=00400000 path=[C:\winetest\psapi_crosstest.exe]
psapi_main.c:125: i=1 hmod=77DD0000 path=[C:\Windows\SysWOW64\ntdll.dll]
psapi_main.c:125: i=2 hmod=77850000 path=[C:\Windows\syswow64\kernel32.dll]
psapi_main.c:125: i=3 hmod=76E00000 path=[C:\Windows\syswow64\KERNELBASE.dll]
psapi_main.c:125: i=4 hmod=777A0000 path=[C:\Windows\syswow64\msvcrt.dll]
psapi_main.c:125: i=5 hmod=75340000 path=[C:\Windows\system32\apphelp.dll]
psapi_main.c:125: i=6 hmod=752B0000 path=[C:\Windows\AppPatch\AcLayers.DLL]
psapi_main.c:125: i=7 hmod=75940000 path=[C:\Windows\syswow64\SspiCli.dll]
psapi_main.c:125: i=8 hmod=77010000 path=[C:\Windows\syswow64\RPCRT4.dll]
psapi_main.c:125: i=9 hmod=75930000 path=[C:\Windows\syswow64\CRYPTBASE.dll]
psapi_main.c:125: i=10 hmod=76E50000 path=[C:\Windows\SysWOW64\sechost.dll]
psapi_main.c:125: i=11 hmod=76A10000 path=[C:\Windows\syswow64\USER32.dll]
psapi_main.c:125: i=12 hmod=772F0000 path=[C:\Windows\syswow64\GDI32.dll]
psapi_main.c:125: i=13 hmod=76B10000 path=[C:\Windows\syswow64\LPK.dll]
psapi_main.c:125: i=14 hmod=76970000 path=[C:\Windows\syswow64\USP10.dll]
psapi_main.c:125: i=15 hmod=76610000 path=[C:\Windows\syswow64\ADVAPI32.dll]
psapi_main.c:125: i=16 hmod=759A0000 path=[C:\Windows\syswow64\SHELL32.dll]
psapi_main.c:125: i=17 hmod=767B0000 path=[C:\Windows\syswow64\SHLWAPI.dll]
psapi_main.c:125: i=18 hmod=77640000 path=[C:\Windows\syswow64\ole32.dll]
psapi_main.c:125: i=19 hmod=76B70000 path=[C:\Windows\syswow64\OLEAUT32.dll]
psapi_main.c:125: i=20 hmod=756E0000 path=[C:\Windows\system32\USERENV.dll]
psapi_main.c:125: i=21 hmod=756D0000 path=[C:\Windows\system32\profapi.dll]
psapi_main.c:125: i=22 hmod=753F0000 path=[C:\Windows\system32\WINSPOOL.DRV]
psapi_main.c:125: i=23 hmod=75290000 path=[C:\Windows\system32\MPR.dll]
psapi_main.c:125: i=24 hmod=76FB0000 path=[C:\Windows\system32\IMM32.DLL]
psapi_main.c:125: i=25 hmod=766B0000 path=[C:\Windows\syswow64\MSCTF.dll]
psapi_main.c:125: i=26 hmod=77DA0000 path=[C:\Windows\syswow64\psapi.dll]

I suspect they are brought in by AcLayers.dll which appears to be an 
'Application Compatibility Layer' dll that got added in Vista+ (isn't it 
ironic that it breaks compatibility for our tests?). However, although 
it's present on disk, it does not get loaded on my Windows 7 VM. Can 
anyone shed more light on this?

And what should we do?
Increase the upper bound check (e.g. to 30 modules) or remove it 

I'm attaching a patch for your testing pleasure.

Francois Gouget <fgouget at>    
          Demander si un ordinateur peut penser revient à demander
                         si un sous-marin peut nager.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: psapi_tests.diff
Type: text/x-diff
Size: 1679 bytes
Desc: psapi_tests.diff
URL: <>

More information about the wine-devel mailing list