user: Added specific winproc functions for calling dialog procedures.

James Hawkins truiken at gmail.com
Fri Jun 9 14:01:59 CDT 2006


Hey Alexandre,

As of the following commit:

Commit: 397bf3c2b133fe36529efcc4c1906bac1aac2da8
URL:    http://source.winehq.org/git/?p=wine.git;a=commit;h=397bf3c2b133fe36529efcc4c1906bac1aac2da8

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Tue May  9 20:33:11 2006 +0200

user: Added specific winproc functions for calling dialog procedures.

The VB/VC++ 6 installers crash pretty early in the setup sequence.
Two things to keep in mind are that the installer works correctly if I
set the win version to win98, or I revert the following part of the
patch:

@@ -447,14 +441,8 @@ LRESULT WINAPI DefDlgProcA( HWND hwnd, U

     SetWindowLongPtrW( hwnd, DWLP_MSGRESULT, 0 );

-    if ((dlgproc = DEFDLG_GetDlgProc( hwnd )))
-    {
-        /* Call dialog procedure */
-        result = CallWindowProcA( dlgproc, hwnd, msg, wParam, lParam );
-        /* 16 bit dlg procs only return BOOL16 */
-        if( WINPROC_GetProcType( dlgproc ) == WIN_PROC_16 )
-            result = LOWORD(result);
-    }
+    if ((dlgproc = DEFDLG_GetDlgProc( hwnd ))) /* Call dialog procedure */
+        result = WINPROC_CallDlgProcA( dlgproc, hwnd, msg, wParam, lParam );

     if (!result && IsWindow(hwnd))
     {


I've done a fair bit of digging around on this bug, and I've noticed
some things that are probably obvious to you, but might help put light
on the situation for others.  The order of the calls before the patch
is applied is:

DefDlgProcA -> CallWindowProcA -> WINPROC_CallWndProc

and after the patch is applied:

DefDlgProcA -> WINPROC_CallDlgProcA -> WINPROC_CallWndProc

I've added debug printf's in these functions to see when they're
called and what certain pointers contain.  With the patch applied and
and win version set to win98, the debug output is the same:

DefDlgProcA
CallWindowProcA func: 0xffff0027
CallWindowProcA proc: 0x40a5e1ac
WINPROC_CallWndProc proc: 0x403020
CallWindowProcA func: 0x41ea2020
CallWindowProcA handle_to_proc returned NULL
WINPROC_CallWndProc proc: 0x41ea2020
WINPROC_CallWndProc proc: 0x41ea2020
CallWindowProcA func: 0x41ea2020
CallWindowProcA handle_to_proc returned NULL
WINPROC_CallWndProc proc: 0x41ea2020
WINPROC_CallWndProc proc: 0x41ea2020
WINPROC_CallWndProc proc: 0x41ea2020
WINPROC_CallWndProc proc: 0x41ea2020
WINPROC_CallWndProc proc: 0x41ea2020

and the installer goes on as usual (we know this because of a richedit
trace from the richedit control on the next install screen).  Here is
the debug output with the patch applied and version set to win2000:

DefDlgProcA
DefDlgProcA dlgproc: 0xffff0026
WINPROC_CallDlgProcA func: 0xffff0026
WINPROC_CallDlgProcA proc: 0x40a5e1f8
WINPROC_CallDlgProcA proc->thunk.proc: 0x412020
WINPROC_CallWndProc proc: 0x412020
wine: Unhandled page fault on read access to 0x00000000 at address
0x411799 (thread 0009), starting debugger...

Any insight you can provide about this bug would be greatly appreciated.

-- 
James Hawkins



More information about the wine-devel mailing list