- Timestamp:
- May 11, 2004, 11:08:20 AM (21 years ago)
- Location:
- trunk/src/user32
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/callwrap.asm
r10379 r10602 1 ; $Id: callwrap.asm,v 1. 1 2004-01-11 12:03:12sandervl Exp $1 ; $Id: callwrap.asm,v 1.2 2004-05-11 09:08:19 sandervl Exp $ 2 2 3 3 ;/* … … 52 52 53 53 54 PUBLIC _WrapCallback4@20 55 ; WrapCallback4(PFN lpfnFunction, DWORD hwnd, DWORD msg, DWORD wParam, DWORD lParam) 56 _WrapCallback4@20 proc near 57 push ebp 58 mov ebp, esp 59 push dword ptr [ebp+24] 60 push dword ptr [ebp+20] 61 push dword ptr [ebp+16] 62 push dword ptr [ebp+12] 63 call dword ptr [ebp+08] 64 65 mov esp, ebp 66 pop ebp 67 ret 20 68 _WrapCallback4@20 endp 69 54 70 CODE32 ENDS 55 71 -
trunk/src/user32/callwrap.h
r10379 r10602 1 // $Id: callwrap.h,v 1. 1 2004-01-11 12:03:13sandervl Exp $1 // $Id: callwrap.h,v 1.2 2004-05-11 09:08:20 sandervl Exp $ 2 2 3 3 /* … … 19 19 DWORD CDECL WrapCallback2(WNDPROC lpfnFunction, DWORD param1, DWORD param2); 20 20 21 DWORD WIN32API WrapCallback4(WNDPROC lpfnFunction, DWORD param1, DWORD param2, DWORD param3, DWORD param4); 22 21 23 #ifdef __cplusplus 22 24 } -
trunk/src/user32/windowmsg.cpp
r10439 r10602 1 /* $Id: windowmsg.cpp,v 1. 49 2004-02-04 14:59:57 birdExp $ */1 /* $Id: windowmsg.cpp,v 1.50 2004-05-11 09:08:20 sandervl Exp $ */ 2 2 /* 3 3 * Win32 window message APIs for OS/2 … … 34 34 #define INCL_TIMERWIN32 35 35 #include "timer.h" 36 #include "callwrap.h" 36 37 37 38 #define DBG_LOCALLOG DBG_windowmsg … … 326 327 * @author knut st. osmundsen <bird-srcspam@anduin.net> 327 328 * @remark One cannot attach a threads input queue to it self. 329 * @remark This implemenation requires the thread which input is 'forwarded' to 330 * process it's message queue. Window (and wine) will not bother that thread 331 * at all with the messages. (DEADLOCK WARNING) 328 332 * @todo Not sure if all this is 100% ok according to the windows reality. 329 333 * I'm sure some error cases aren't caught. … … 1002 1006 if (WINPROC_MapMsg32ATo32W( hwnd, msg, &wParam, &lParam ) == -1) return 0; 1003 1007 1004 result = func(hwnd, msg, wParam, lParam );1008 result = WrapCallback4(func, hwnd, msg, wParam, lParam ); 1005 1009 WINPROC_UnmapMsg32ATo32W( hwnd, msg, wParam, lParam ); 1006 1010 … … 1013 1017 { 1014 1018 LPWSTR ustr = ( LPWSTR )HeapAlloc( GetProcessHeap(), 0, ( result + 1 ) * sizeof( WCHAR )); 1015 result = func(hwnd, WM_GETTEXT, ( WPARAM )( result + 1 ), ( LPARAM )ustr );1019 result = WrapCallback4(func, hwnd, WM_GETTEXT, ( WPARAM )( result + 1 ), ( LPARAM )ustr ); 1016 1020 result = lstrlenWtoA( ustr, result ); 1017 1021 HeapFree( GetProcessHeap(), 0, ustr ); … … 1022 1026 { 1023 1027 LPWSTR ustr = ( LPWSTR )HeapAlloc( GetProcessHeap(), 0, ( result + 1 ) * sizeof( WCHAR )); 1024 result = func(hwnd, LB_GETTEXT, wParam, ( LPARAM )ustr );1028 result = WrapCallback4(func, hwnd, LB_GETTEXT, wParam, ( LPARAM )ustr ); 1025 1029 if( result != LB_ERR ) 1026 1030 result = lstrlenWtoA( ustr, result ); … … 1034 1038 { 1035 1039 LPWSTR ustr = ( LPWSTR )HeapAlloc( GetProcessHeap(), 0, ( result + 1 ) * sizeof( WCHAR )); 1036 result = func(hwnd, CB_GETLBTEXT, wParam, ( LPARAM )ustr );1040 result = WrapCallback4(func, hwnd, CB_GETLBTEXT, wParam, ( LPARAM )ustr ); 1037 1041 if( result != CB_ERR ) 1038 1042 result = lstrlenWtoA( ustr, result ); … … 1060 1064 if (WINPROC_MapMsg32WTo32A( hwnd, msg, &wParam, &lParam ) == -1) return 0; 1061 1065 1062 result = func(hwnd, msg, wParam, lParam );1066 result = WrapCallback4(func, hwnd, msg, wParam, lParam ); 1063 1067 WINPROC_UnmapMsg32WTo32A( hwnd, msg, wParam, lParam ); 1064 1068 … … 1071 1075 { 1072 1076 LPSTR astr = ( LPSTR )HeapAlloc( GetProcessHeap(), 0, result + 1 ); 1073 result = func(hwnd, WM_GETTEXT, ( WPARAM )( result + 1 ), ( LPARAM )astr );1077 result = WrapCallback4(func, hwnd, WM_GETTEXT, ( WPARAM )( result + 1 ), ( LPARAM )astr ); 1074 1078 result = lstrlenAtoW( astr, result ); 1075 1079 HeapFree( GetProcessHeap(), 0, astr ); … … 1080 1084 { 1081 1085 LPSTR astr = ( LPSTR )HeapAlloc( GetProcessHeap(), 0, result + 1 ); 1082 result = func(hwnd, LB_GETTEXT, wParam, ( LPARAM )astr );1086 result = WrapCallback4(func, hwnd, LB_GETTEXT, wParam, ( LPARAM )astr ); 1083 1087 if( result != LB_ERR ) 1084 1088 result = lstrlenAtoW( astr, result ); … … 1092 1096 { 1093 1097 LPSTR astr = ( LPSTR )HeapAlloc( GetProcessHeap(), 0, result + 1 ); 1094 result = func(hwnd, CB_GETLBTEXT, wParam, ( LPARAM )astr );1098 result = WrapCallback4(func, hwnd, CB_GETLBTEXT, wParam, ( LPARAM )astr ); 1095 1099 if( result != CB_ERR ) 1096 1100 result = lstrlenAtoW( astr, result ); -
trunk/src/user32/winproc.cpp
r10256 r10602 1 /* $Id: winproc.cpp,v 1. 8 2003-10-02 10:36:00 sandervl Exp $ */1 /* $Id: winproc.cpp,v 1.9 2004-05-11 09:08:20 sandervl Exp $ */ 2 2 /* 3 3 * Window procedure callbacks … … 17 17 #include <os2win.h> 18 18 #include <string.h> 19 #include "callwrap.h" 19 20 #include <win\winproc.h> 20 21 #include <win\debugtools.h> … … 313 314 } 314 315 315 if (!proc) return func(hwnd, msg, wParam, lParam );316 if (!proc) return WrapCallback4(func, hwnd, msg, wParam, lParam ); 316 317 317 318 switch(proc->type) 318 319 { 319 320 case WIN_PROC_32A: 320 return func(hwnd, msg, wParam, lParam );321 return WrapCallback4(func, hwnd, msg, wParam, lParam ); 321 322 case WIN_PROC_32W: 322 323 return WINPROC_CallProc32ATo32W( func, hwnd, msg, wParam, lParam ); … … 347 348 } 348 349 349 if (!proc) return func(hwnd, msg, wParam, lParam );350 if (!proc) return WrapCallback4(func, hwnd, msg, wParam, lParam ); 350 351 351 352 switch(proc->type) … … 354 355 return WINPROC_CallProc32WTo32A( func, hwnd, msg, wParam, lParam ); 355 356 case WIN_PROC_32W: 356 return func(hwnd, msg, wParam, lParam );357 return WrapCallback4(func, hwnd, msg, wParam, lParam ); 357 358 default: 358 359 WARN_(relay)("Invalid proc %p\n", proc );
Note:
See TracChangeset
for help on using the changeset viewer.