1/*
2 * COPYRIGHT:       See COPYING in the top level directory
3 * PROJECT:         ReactOS user32.dll
4 * FILE:            win32ss/user/user32/windows/wndproc_fixup.S
5 * PURPOSE:         Messages
6 * PROGRAMMER:      Jérôme Gardou jerome.gardou@reactos.org
7 * LICENCE :        LGPL, copyright Alexandre Julliard
8 */
9
10#include <asm.inc>
11#include <ks386.inc>
12
13/* Some applications provide invalid callbacks which don't follow the stdcall convention */
14
15.code
16
17/*
18 * LRESULT
19 * __cdecl
20 * CALL_EXTERN_WNDPROC(
21 *     WNDPROC WndProc,
22 *     HWND hWnd,
23 *     UINT Msg,
24 *     WPARAM wParam,
25 *     LPARAM lParam);
26 */
27PUBLIC _CALL_EXTERN_WNDPROC
28FUNC _CALL_EXTERN_WNDPROC
29    FPO 0, 0, 0, 0, 0, FRAME_FPO
30
31    push ebp
32    mov ebp, esp
33
34    push edi
35    push esi
36    push ebp
37
38    sub esp, 12
39
40    push dword ptr [ebp + 24]
41    push dword ptr [ebp + 20]
42    push dword ptr [ebp + 16]
43    push dword ptr [ebp + 12]
44    mov eax, dword ptr [ebp + 8]
45
46    call eax
47
48    lea esp, dword ptr [ebp - 12]
49    pop ebx
50    pop esi
51    pop edi
52
53    leave
54    ret
55
56ENDFUNC
57
58END
59