[Bug 23492] Windows Driver Kit (WDK) 7.1.0 install fails (check for superclassed case in AtlModuleRegisterWndClassInfoA/W before returning new wndproc)

wine-bugs at winehq.org wine-bugs at winehq.org
Thu Apr 28 09:35:20 CDT 2011


Anastasius Focht <focht at gmx.net> changed:

           What    |Removed                     |Added
                 CC|                            |focht at gmx.net
          Component|-unknown                    |atl
            Summary|Windows Driver Kit (WDK)    |Windows Driver Kit (WDK)
                   |7.1.0 install fails         |7.1.0 install fails (check
                   |                            |for superclassed case in
                   |                            |AtlModuleRegisterWndClassIn
                   |                            |foA/W before returning new
                   |                            |wndproc)

--- Comment #4 from Anastasius Focht <focht at gmx.net> 2011-04-28 09:35:19 CDT ---

follow-up bug from bug 26028.
If that bug is fixed, the ActiveX control crashes the same way as the installer
The problem lies apparently in AtlModuleRegisterWndClassInfoA/W().

--- snip ---
0022:Call atl.AtlModuleRegisterWndClassInfoW(010f3e40,010f1678,003baa3c)
0022:fixme:atl:AtlModuleRegisterWndClassInfoW 0x10f3e40 0x10f1678 0x3baa3c
0022:trace:atl:AtlModuleRegisterWndClassInfoW wci->m_wc.lpszClassName =
0022:Call user32.GetClassInfoExW(01000000,0102ce78
L"KitSetup_SplashScreen",005ce8bc) ret=684f0493
0022:Ret  user32.GetClassInfoExW() retval=00000000 ret=684f0493
0022:Call user32.RegisterClassExW(010f1678) ret=684f04ac
0022:trace:win:alloc_winproc allocated 0xffff0023 for W 0x10ad258 (36/4096
0022:Ret  user32.RegisterClassExW() retval=0000c043 ret=684f04ac
0022:trace:atl:AtlModuleRegisterWndClassInfoW returning 0xc043
0022:Ret  atl.AtlModuleRegisterWndClassInfoW() retval=0000c043 ret=010ad1b3
0022:Call atl.AtlModuleAddCreateWndData(010f3e40,003baa28,003baa20)
0022:trace:atl:AtlModuleAddCreateWndData (0x10f3e40, 0x3baa28, 0x3baa20)
0022:Ret  atl.AtlModuleAddCreateWndData() retval=010f3e40 ret=010ad2e5
0022:Call user32.CreateWindowExW(00000000,0000c043,0102cea4 L"KitSetup
0022:trace:win:WIN_CreateWindowEx L"KitSetup Initializing..." #c043 ex=00000000
style=90000a03 0,0 800x600 parent=(nil) menu=(nil) inst=0x1000000 params=(nil)
0022:trace:win:dump_window_styles style: WS_POPUP WS_VISIBLE 00000a03
0022:trace:win:dump_window_styles exstyle:
0022:trace:win:WIN_CreateWindowEx hwnd 0x60050 cs 0,0 800x600
0022:Call window proc 0x10ad258
0022:Call atl.AtlModuleExtractCreateWndData(010f3e40) ret=010ad26b
0022:trace:atl:AtlModuleExtractCreateWndData (0x10f3e40)
0022:Ret  atl.AtlModuleExtractCreateWndData() retval=003baa20 ret=010ad26b
0022:Call user32.SetWindowLongW(00060050,fffffffc,001421b0) ret=010ad292
0022:trace:win:WIN_SetWindowLong 0x60050 -4 1421b0 W
0022:trace:win:alloc_winproc allocated 0xffff0024 for W 0x1421b0 (37/4096 used)
0022:Ret  user32.SetWindowLongW() retval=010ad258 ret=010ad292
0022:Call user32.CallWindowProcW(010ad258,00060050,00000081,00000000,005ce870)
0022:Call window proc 0x10ad258
0022:Call atl.AtlModuleExtractCreateWndData(010f3e40) ret=010ad26b
0022:trace:atl:AtlModuleExtractCreateWndData (0x10f3e40)
0022:Ret  atl.AtlModuleExtractCreateWndData() retval=00000000 ret=010ad26b
0022:trace:seh:raise_exception code=c0000005 flags=0 addr=0x10ad270 ip=010ad270
0022:trace:seh:raise_exception  info[0]=00000000
0022:trace:seh:raise_exception  info[1]=00000000
0022:trace:seh:raise_exception  eax=00000000 ebx=00060050 ecx=00000000
edx=005cef8c esi=00000000 edi=005ce384
0022:trace:seh:raise_exception  ebp=005ce2b8 esp=005ce2ac cs=0073 ds=007b
es=007b fs=0033 gs=003b flags=00010206
0022:trace:seh:call_vectored_handlers calling handler at 0x68e406d6
code=c0000005 flags=0
0022:trace:seh:call_vectored_handlers handler at 0x68e406d6 returned 0
0022:trace:seh:call_stack_handlers calling handler at 0x10dd17e code=c0000005
--- snip ---

AtlModuleExtractCreateWndData() should never get called twice here (the app
doesn't expect this).

In first call of app window proc (WM_NCCREATE), the app retrieves its instance
data data through AtlModuleExtractCreateWndData().
The app then does some initialization (members, thunk) and sets a new window
proc SetWindowLongW().
The actual work is delegated back by calling the old (prev) window proc of
though CallWindowProcW().
The problem: the old window proc (prev member) is the _same_ app window proc
which was called for window creation (WM_NCCREATE) - and this is wrong.
The default window must be called in this case, not the app supplied one.

--- snip dlls/atl/atl_main.c ---
*wci, WNDPROC *pProc)
    ATOM atom;

    FIXME("%p %p %p semi-stub\n", pm, wci, pProc);

    atom = wci->m_atom;
    if (!atom)

    *pProc = wci->pWndProc;

    TRACE("returning 0x%04x\n", atom);
    return atom;
--- snip dlls/atl/atl_main.c ---

You need to check for superclassed case (e.g. _ATL_WNDCLASSINFO member ->
m_lpszOrigName != NULL) before returning a new window proc in out param,
effectively replacing the default one in app wnd data.

You need to fix AtlModuleRegisterWndClassInfoW() for the installer here and
AtlModuleRegisterWndClassInfoA() for the app in bug 26028
They will both successfully start then without any native override.


Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
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