Exception in DefWindowProcA

Paul Vriens paul.vriens at xs4all.nl
Tue Apr 26 05:50:22 CDT 2005


when running proces explorer (V9.0.3) and some hacks, I get an exception
in DefWindowProcA:

trace:message:SPY_EnterMessage         (0x20022)  DefWindowProc32:
WM_GETTEXT [000d]  wp=00000100 lp=00000000

Call kernel32.WideCharToMultiByte(00000000,00000000,6b2592e0 L"Process
Explorer - Sysinternals:
Ret  kernel32.WideCharToMultiByte() retval=00000000 ret=61b8be52

trace:seh:EXC_RtlRaiseException code=c0000005 flags=0 addr=0x61b8be5c

It somewhat boils down to this piece of code in defwnd.c:

if (wndPtr->text)
    if (!WideCharToMultiByte( CP_ACP, 0, wndPtr->text, -1,
                             dest, wParam, NULL, NULL )) dest[wParam-1] = 0;
    result = strlen( dest );
else dest[0] = '\0';
WIN_ReleasePtr( wndPtr );

dest = NULL in my case so I added some tests for this:

if (wndPtr->text)
    if (!WideCharToMultiByte( CP_ACP, 0, wndPtr->text, -1,
                             dest, wParam, NULL, NULL ))
        if (dest) dest[wParam-1] = 0;

    if (dest) result = strlen( dest );
    else result = 0;

This makes the GUI appear but I want to find out if the call is valid or
that we indeed should check for dest being NULL.

Any ideas?



More information about the wine-devel mailing list