mirror of
https://github.com/reactos/reactos.git
synced 2025-06-10 12:24:48 +00:00
[User32]
- Leave Dialog Procedure calls protected with SEH, the same as windows. - See CORE-12182, CORE-12111 and related issues. svn path=/trunk/; revision=73088
This commit is contained in:
parent
8793f1b4c6
commit
07bc9a400d
1 changed files with 53 additions and 0 deletions
|
@ -934,6 +934,7 @@ MsgiUnicodeToAnsiMessage(HWND hwnd, LPMSG AnsiMsg, LPMSG UnicodeMsg)
|
||||||
/* Ansi string might contain MBCS chars so we need 2 * the number of chars */
|
/* Ansi string might contain MBCS chars so we need 2 * the number of chars */
|
||||||
AnsiMsg->lParam = (LPARAM) RtlAllocateHeap(GetProcessHeap(), HEAP_ZERO_MEMORY, UnicodeMsg->wParam * 2);
|
AnsiMsg->lParam = (LPARAM) RtlAllocateHeap(GetProcessHeap(), HEAP_ZERO_MEMORY, UnicodeMsg->wParam * 2);
|
||||||
//ERR("WM_GETTEXT U2A Size %d\n",AnsiMsg->wParam);
|
//ERR("WM_GETTEXT U2A Size %d\n",AnsiMsg->wParam);
|
||||||
|
|
||||||
if (!AnsiMsg->lParam) return FALSE;
|
if (!AnsiMsg->lParam) return FALSE;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -1463,7 +1464,20 @@ IntCallWindowProcW(BOOL IsAnsiProc,
|
||||||
|
|
||||||
if (PreResult) goto Exit;
|
if (PreResult) goto Exit;
|
||||||
|
|
||||||
|
if (!Dialog)
|
||||||
Result = CALL_EXTERN_WNDPROC(WndProc, AnsiMsg.hwnd, AnsiMsg.message, AnsiMsg.wParam, AnsiMsg.lParam);
|
Result = CALL_EXTERN_WNDPROC(WndProc, AnsiMsg.hwnd, AnsiMsg.message, AnsiMsg.wParam, AnsiMsg.lParam);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_SEH2_TRY
|
||||||
|
{
|
||||||
|
Result = CALL_EXTERN_WNDPROC(WndProc, AnsiMsg.hwnd, AnsiMsg.message, AnsiMsg.wParam, AnsiMsg.lParam);
|
||||||
|
}
|
||||||
|
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
|
||||||
|
{
|
||||||
|
ERR("Exception Dialog Ansi %p Msg %d pti %p Wndpti %p\n",WndProc,Msg,GetW32ThreadInfo(),pWnd->head.pti);
|
||||||
|
}
|
||||||
|
_SEH2_END;
|
||||||
|
}
|
||||||
|
|
||||||
if (Hook && MsgOverride)
|
if (Hook && MsgOverride)
|
||||||
{
|
{
|
||||||
|
@ -1504,7 +1518,20 @@ IntCallWindowProcW(BOOL IsAnsiProc,
|
||||||
|
|
||||||
if (PreResult) goto Exit;
|
if (PreResult) goto Exit;
|
||||||
|
|
||||||
|
if (!Dialog)
|
||||||
Result = CALL_EXTERN_WNDPROC(WndProc, hWnd, Msg, wParam, lParam);
|
Result = CALL_EXTERN_WNDPROC(WndProc, hWnd, Msg, wParam, lParam);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_SEH2_TRY
|
||||||
|
{
|
||||||
|
Result = CALL_EXTERN_WNDPROC(WndProc, hWnd, Msg, wParam, lParam);
|
||||||
|
}
|
||||||
|
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
|
||||||
|
{
|
||||||
|
ERR("Exception Dialog unicode %p Msg %d pti %p Wndpti %p\n",WndProc, Msg,GetW32ThreadInfo(),pWnd->head.pti);
|
||||||
|
}
|
||||||
|
_SEH2_END;
|
||||||
|
}
|
||||||
|
|
||||||
if (Hook && MsgOverride)
|
if (Hook && MsgOverride)
|
||||||
{
|
{
|
||||||
|
@ -1584,7 +1611,20 @@ IntCallWindowProcA(BOOL IsAnsiProc,
|
||||||
|
|
||||||
if (PreResult) goto Exit;
|
if (PreResult) goto Exit;
|
||||||
|
|
||||||
|
if (!Dialog)
|
||||||
Result = CALL_EXTERN_WNDPROC(WndProc, hWnd, Msg, wParam, lParam);
|
Result = CALL_EXTERN_WNDPROC(WndProc, hWnd, Msg, wParam, lParam);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_SEH2_TRY
|
||||||
|
{
|
||||||
|
Result = CALL_EXTERN_WNDPROC(WndProc, hWnd, Msg, wParam, lParam);
|
||||||
|
}
|
||||||
|
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
|
||||||
|
{
|
||||||
|
ERR("Exception Dialog Ansi %p Msg %d pti %p Wndpti %p\n",WndProc,Msg,GetW32ThreadInfo(),pWnd->head.pti);
|
||||||
|
}
|
||||||
|
_SEH2_END;
|
||||||
|
}
|
||||||
|
|
||||||
if (Hook && MsgOverride)
|
if (Hook && MsgOverride)
|
||||||
{
|
{
|
||||||
|
@ -1632,7 +1672,20 @@ IntCallWindowProcA(BOOL IsAnsiProc,
|
||||||
|
|
||||||
if (PreResult) goto Exit;
|
if (PreResult) goto Exit;
|
||||||
|
|
||||||
|
if (!Dialog)
|
||||||
Result = CALL_EXTERN_WNDPROC(WndProc, UnicodeMsg.hwnd, UnicodeMsg.message, UnicodeMsg.wParam, UnicodeMsg.lParam);
|
Result = CALL_EXTERN_WNDPROC(WndProc, UnicodeMsg.hwnd, UnicodeMsg.message, UnicodeMsg.wParam, UnicodeMsg.lParam);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_SEH2_TRY
|
||||||
|
{
|
||||||
|
Result = CALL_EXTERN_WNDPROC(WndProc, UnicodeMsg.hwnd, UnicodeMsg.message, UnicodeMsg.wParam, UnicodeMsg.lParam);
|
||||||
|
}
|
||||||
|
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
|
||||||
|
{
|
||||||
|
ERR("Exception Dialog unicode %p Msg %d pti %p Wndpti %p\n",WndProc, Msg,GetW32ThreadInfo(),pWnd->head.pti);
|
||||||
|
}
|
||||||
|
_SEH2_END;
|
||||||
|
}
|
||||||
|
|
||||||
if (Hook && MsgOverride)
|
if (Hook && MsgOverride)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue