| 1 | #ifndef __DBBWRAP_H__ | 
|---|
| 2 | #define __DBBWRAP_H__ | 
|---|
| 3 |  | 
|---|
| 4 | #include <odinwrap.h> | 
|---|
| 5 |  | 
|---|
| 6 | typedef DWORD (* WIN32API DBG_WINPROC0)(); | 
|---|
| 7 | typedef DWORD (* WIN32API DBG_WINPROC4)(DWORD); | 
|---|
| 8 | typedef DWORD (* WIN32API DBG_WINPROC4_NORET)(DWORD); | 
|---|
| 9 | typedef DWORD (* WIN32API DBG_WINPROC8)(DWORD, DWORD); | 
|---|
| 10 | typedef DWORD (* WIN32API DBG_WINPROC12)(DWORD, DWORD, DWORD); | 
|---|
| 11 | typedef DWORD (* WIN32API DBG_WINPROC16)(DWORD, DWORD, DWORD, DWORD); | 
|---|
| 12 | typedef DWORD (* WIN32API DBG_WINPROC20)(DWORD, DWORD, DWORD, DWORD, DWORD); | 
|---|
| 13 | typedef DWORD (* WIN32API DBG_WINPROC24)(DWORD, DWORD, DWORD, DWORD, DWORD, DWORD); | 
|---|
| 14 | typedef DWORD (* WIN32API DBG_WINPROC28)(DWORD, DWORD, DWORD, DWORD, DWORD, DWORD, DWORD); | 
|---|
| 15 | typedef DWORD (* WIN32API DBG_WINPROC32)(DWORD, DWORD, DWORD, DWORD, DWORD, DWORD, DWORD, DWORD); | 
|---|
| 16 | typedef DWORD (* WIN32API DBG_WINPROC36)(DWORD, DWORD, DWORD, DWORD, DWORD, DWORD, DWORD, DWORD, DWORD); | 
|---|
| 17 | typedef DWORD (* WIN32API DBG_WINPROC40)(DWORD, DWORD, DWORD, DWORD, DWORD, DWORD, DWORD, DWORD, DWORD, DWORD); | 
|---|
| 18 | typedef DWORD (* WIN32API DBG_WINPROC44)(DWORD, DWORD, DWORD, DWORD, DWORD, DWORD, DWORD, DWORD, DWORD, DWORD, DWORD); | 
|---|
| 19 | typedef DWORD (* WIN32API DBG_WINPROC48)(DWORD, DWORD, DWORD, DWORD, DWORD, DWORD, DWORD, DWORD, DWORD, DWORD, DWORD, DWORD); | 
|---|
| 20 | typedef DWORD (* WIN32API DBG_WINPROC52)(DWORD, DWORD, DWORD, DWORD, DWORD, DWORD, DWORD, DWORD, DWORD, DWORD, DWORD, DWORD, DWORD); | 
|---|
| 21 |  | 
|---|
| 22 | #define DEBUGWRAP0(a) \ | 
|---|
| 23 | DWORD WIN32API Dbg##a()             \ | 
|---|
| 24 | {                                          \ | 
|---|
| 25 | DWORD ret;                             \ | 
|---|
| 26 | dprintf((DBGWRAP_MODULE": %s", #a));         \ | 
|---|
| 27 | dbg_ThreadPushCall(#a); \ | 
|---|
| 28 | ret = (DWORD)a();         \ | 
|---|
| 29 | dbg_ThreadPopCall(); \ | 
|---|
| 30 | dprintf((DBGWRAP_MODULE": %s returned %x", #a, ret)); \ | 
|---|
| 31 | return ret;                            \ | 
|---|
| 32 | } | 
|---|
| 33 |  | 
|---|
| 34 | #define DEBUGWRAP0_NORET(a) \ | 
|---|
| 35 | void WIN32API Dbg##a()             \ | 
|---|
| 36 | {                                          \ | 
|---|
| 37 | DWORD ret;                             \ | 
|---|
| 38 | dprintf((DBGWRAP_MODULE": %s", #a));         \ | 
|---|
| 39 | dbg_ThreadPushCall(#a); \ | 
|---|
| 40 | a();         \ | 
|---|
| 41 | dbg_ThreadPopCall(); \ | 
|---|
| 42 | } | 
|---|
| 43 |  | 
|---|
| 44 | #define DEBUGWRAP4(a) \ | 
|---|
| 45 | DWORD WIN32API Dbg##a(DWORD arg1)             \ | 
|---|
| 46 | {                                          \ | 
|---|
| 47 | DWORD ret;                             \ | 
|---|
| 48 | dprintf((DBGWRAP_MODULE": %s %x", #a, arg1));         \ | 
|---|
| 49 | dbg_ThreadPushCall(#a); \ | 
|---|
| 50 | ret = ((DBG_WINPROC4)a)(arg1);         \ | 
|---|
| 51 | dbg_ThreadPopCall(); \ | 
|---|
| 52 | dprintf((DBGWRAP_MODULE": %s returned %x", #a, ret)); \ | 
|---|
| 53 | return ret;                            \ | 
|---|
| 54 | } | 
|---|
| 55 |  | 
|---|
| 56 | #define DEBUGWRAP4_NORET(a) \ | 
|---|
| 57 | void WIN32API Dbg##a(DWORD arg1)             \ | 
|---|
| 58 | {                                          \ | 
|---|
| 59 | dprintf((DBGWRAP_MODULE": %s %x", #a, arg1));         \ | 
|---|
| 60 | dbg_ThreadPushCall(#a); \ | 
|---|
| 61 | ((DBG_WINPROC4_NORET)a)(arg1);         \ | 
|---|
| 62 | dbg_ThreadPopCall(); \ | 
|---|
| 63 | } | 
|---|
| 64 |  | 
|---|
| 65 | #define DEBUGWRAP8(a) \ | 
|---|
| 66 | DWORD WIN32API Dbg##a(DWORD arg1, DWORD arg2) \ | 
|---|
| 67 | {                                          \ | 
|---|
| 68 | DWORD ret;                             \ | 
|---|
| 69 | dprintf((DBGWRAP_MODULE": %s %x %x", #a, arg1, arg2));         \ | 
|---|
| 70 | dbg_ThreadPushCall(#a); \ | 
|---|
| 71 | ret = ((DBG_WINPROC8)a)(arg1, arg2);         \ | 
|---|
| 72 | dbg_ThreadPopCall(); \ | 
|---|
| 73 | dprintf((DBGWRAP_MODULE": %s returned %x", #a, ret)); \ | 
|---|
| 74 | return ret;                            \ | 
|---|
| 75 | } | 
|---|
| 76 |  | 
|---|
| 77 | #define DEBUGWRAP8_NORET(a) \ | 
|---|
| 78 | void WIN32API Dbg##a(DWORD arg1, DWORD arg2) \ | 
|---|
| 79 | {                                          \ | 
|---|
| 80 | dprintf((DBGWRAP_MODULE": %s %x %x", #a, arg1, arg2));         \ | 
|---|
| 81 | dbg_ThreadPushCall(#a); \ | 
|---|
| 82 | ((DBG_WINPROC8)a)(arg1, arg2);         \ | 
|---|
| 83 | dbg_ThreadPopCall(); \ | 
|---|
| 84 | dprintf((DBGWRAP_MODULE": %s", #a)); \ | 
|---|
| 85 | } | 
|---|
| 86 |  | 
|---|
| 87 | #define DEBUGWRAP12(a) \ | 
|---|
| 88 | DWORD WIN32API Dbg##a(DWORD arg1, DWORD arg2, DWORD arg3) \ | 
|---|
| 89 | {                                          \ | 
|---|
| 90 | DWORD ret;                             \ | 
|---|
| 91 | dprintf((DBGWRAP_MODULE": %s %x %x %x", #a, arg1, arg2, arg3));         \ | 
|---|
| 92 | dbg_ThreadPushCall(#a); \ | 
|---|
| 93 | ret = ((DBG_WINPROC12)a)(arg1, arg2, arg3);         \ | 
|---|
| 94 | dbg_ThreadPopCall(); \ | 
|---|
| 95 | dprintf((DBGWRAP_MODULE": %s returned %x", #a, ret)); \ | 
|---|
| 96 | return ret;                            \ | 
|---|
| 97 | } | 
|---|
| 98 |  | 
|---|
| 99 | #define DEBUGWRAP16(a) \ | 
|---|
| 100 | DWORD WIN32API Dbg##a(DWORD arg1, DWORD arg2, DWORD arg3, DWORD arg4) \ | 
|---|
| 101 | {                                          \ | 
|---|
| 102 | DWORD ret;                             \ | 
|---|
| 103 | dprintf((DBGWRAP_MODULE": %s %x %x %x %x", #a, arg1, arg2, arg3, arg4));         \ | 
|---|
| 104 | dbg_ThreadPushCall(#a); \ | 
|---|
| 105 | ret = ((DBG_WINPROC16)a)(arg1, arg2, arg3, arg4);         \ | 
|---|
| 106 | dbg_ThreadPopCall(); \ | 
|---|
| 107 | dprintf((DBGWRAP_MODULE": %s returned %x", #a, ret)); \ | 
|---|
| 108 | return ret;                            \ | 
|---|
| 109 | } | 
|---|
| 110 |  | 
|---|
| 111 | #define DEBUGWRAP20(a) \ | 
|---|
| 112 | DWORD WIN32API Dbg##a(DWORD arg1, DWORD arg2, DWORD arg3, DWORD arg4, DWORD arg5) \ | 
|---|
| 113 | {                                          \ | 
|---|
| 114 | DWORD ret;                             \ | 
|---|
| 115 | dprintf((DBGWRAP_MODULE": %s %x %x %x %x %x", #a, arg1, arg2, arg3, arg4, arg5));         \ | 
|---|
| 116 | dbg_ThreadPushCall(#a); \ | 
|---|
| 117 | ret = ((DBG_WINPROC20)a)(arg1, arg2, arg3, arg4, arg5);         \ | 
|---|
| 118 | dbg_ThreadPopCall(); \ | 
|---|
| 119 | dprintf((DBGWRAP_MODULE": %s returned %x", #a, ret)); \ | 
|---|
| 120 | return ret;                            \ | 
|---|
| 121 | } | 
|---|
| 122 |  | 
|---|
| 123 | #define DEBUGWRAP24(a) \ | 
|---|
| 124 | DWORD WIN32API Dbg##a(DWORD arg1, DWORD arg2, DWORD arg3, DWORD arg4, DWORD arg5, DWORD arg6) \ | 
|---|
| 125 | {                                          \ | 
|---|
| 126 | DWORD ret;                             \ | 
|---|
| 127 | dprintf((DBGWRAP_MODULE": %s %x %x %x %x %x %x", #a, arg1, arg2, arg3, arg4, arg5, arg6));         \ | 
|---|
| 128 | dbg_ThreadPushCall(#a); \ | 
|---|
| 129 | ret = ((DBG_WINPROC24)a)(arg1, arg2, arg3, arg4, arg5, arg6);         \ | 
|---|
| 130 | dbg_ThreadPopCall(); \ | 
|---|
| 131 | dprintf((DBGWRAP_MODULE": %s returned %x", #a, ret)); \ | 
|---|
| 132 | return ret;                            \ | 
|---|
| 133 | } | 
|---|
| 134 |  | 
|---|
| 135 | #define DEBUGWRAP28(a) \ | 
|---|
| 136 | DWORD WIN32API Dbg##a(DWORD arg1, DWORD arg2, DWORD arg3, DWORD arg4, DWORD arg5, DWORD arg6, DWORD arg7) \ | 
|---|
| 137 | {                                          \ | 
|---|
| 138 | DWORD ret;                             \ | 
|---|
| 139 | dprintf((DBGWRAP_MODULE": %s %x %x %x %x %x %x %x", #a, arg1, arg2, arg3, arg4, arg5, arg6, arg7));         \ | 
|---|
| 140 | dbg_ThreadPushCall(#a); \ | 
|---|
| 141 | ret = ((DBG_WINPROC28)a)(arg1, arg2, arg3, arg4, arg5, arg6, arg7);         \ | 
|---|
| 142 | dbg_ThreadPopCall(); \ | 
|---|
| 143 | dprintf((DBGWRAP_MODULE": %s returned %x", #a, ret)); \ | 
|---|
| 144 | return ret;                            \ | 
|---|
| 145 | } | 
|---|
| 146 |  | 
|---|
| 147 | #define DEBUGWRAP32(a) \ | 
|---|
| 148 | DWORD WIN32API Dbg##a(DWORD arg1, DWORD arg2, DWORD arg3, DWORD arg4, DWORD arg5, DWORD arg6, DWORD arg7, DWORD arg8) \ | 
|---|
| 149 | {                                          \ | 
|---|
| 150 | DWORD ret;                             \ | 
|---|
| 151 | dprintf((DBGWRAP_MODULE": %s %x %x %x %x %x %x %x %x ", #a, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8));         \ | 
|---|
| 152 | dbg_ThreadPushCall(#a); \ | 
|---|
| 153 | ret = ((DBG_WINPROC32)a)(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);         \ | 
|---|
| 154 | dbg_ThreadPopCall(); \ | 
|---|
| 155 | dprintf((DBGWRAP_MODULE": %s returned %x", #a, ret)); \ | 
|---|
| 156 | return ret;                            \ | 
|---|
| 157 | } | 
|---|
| 158 |  | 
|---|
| 159 | #define DEBUGWRAP36(a) \ | 
|---|
| 160 | DWORD WIN32API Dbg##a(DWORD arg1, DWORD arg2, DWORD arg3, DWORD arg4, DWORD arg5, DWORD arg6, DWORD arg7, DWORD arg8, DWORD arg9) \ | 
|---|
| 161 | {                                          \ | 
|---|
| 162 | DWORD ret;                             \ | 
|---|
| 163 | dprintf((DBGWRAP_MODULE": %s %x %x %x %x %x %x %x %x %x", #a, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9));         \ | 
|---|
| 164 | dbg_ThreadPushCall(#a); \ | 
|---|
| 165 | ret = ((DBG_WINPROC36)a)(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9);         \ | 
|---|
| 166 | dbg_ThreadPopCall(); \ | 
|---|
| 167 | dprintf((DBGWRAP_MODULE": %s returned %x", #a, ret)); \ | 
|---|
| 168 | return ret;                            \ | 
|---|
| 169 | } | 
|---|
| 170 |  | 
|---|
| 171 | #define DEBUGWRAP40(a) \ | 
|---|
| 172 | DWORD WIN32API Dbg##a(DWORD arg1, DWORD arg2, DWORD arg3, DWORD arg4, DWORD arg5, DWORD arg6, DWORD arg7, DWORD arg8, DWORD arg9, DWORD arg10) \ | 
|---|
| 173 | {                                          \ | 
|---|
| 174 | DWORD ret;                             \ | 
|---|
| 175 | dprintf((DBGWRAP_MODULE": %s %x %x %x %x %x %x %x %x %x %x", #a, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10));         \ | 
|---|
| 176 | dbg_ThreadPushCall(#a); \ | 
|---|
| 177 | ret = ((DBG_WINPROC40)a)(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10);         \ | 
|---|
| 178 | dbg_ThreadPopCall(); \ | 
|---|
| 179 | dprintf((DBGWRAP_MODULE": %s returned %x", #a, ret)); \ | 
|---|
| 180 | return ret;                            \ | 
|---|
| 181 | } | 
|---|
| 182 |  | 
|---|
| 183 | #define DEBUGWRAP44(a) \ | 
|---|
| 184 | DWORD WIN32API Dbg##a(DWORD arg1, DWORD arg2, DWORD arg3, DWORD arg4, DWORD arg5, DWORD arg6, DWORD arg7, DWORD arg8, DWORD arg9, DWORD arg10, DWORD arg11) \ | 
|---|
| 185 | {                                          \ | 
|---|
| 186 | DWORD ret;                             \ | 
|---|
| 187 | dprintf((DBGWRAP_MODULE": %s %x %x %x %x %x %x %x %x %x %x %x", #a, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11));         \ | 
|---|
| 188 | dbg_ThreadPushCall(#a); \ | 
|---|
| 189 | ret = ((DBG_WINPROC44)a)(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11);         \ | 
|---|
| 190 | dbg_ThreadPopCall(); \ | 
|---|
| 191 | dprintf((DBGWRAP_MODULE": %s returned %x", #a, ret)); \ | 
|---|
| 192 | return ret;                            \ | 
|---|
| 193 | } | 
|---|
| 194 |  | 
|---|
| 195 | #define DEBUGWRAP48(a) \ | 
|---|
| 196 | DWORD WIN32API Dbg##a(DWORD arg1, DWORD arg2, DWORD arg3, DWORD arg4, DWORD arg5, DWORD arg6, DWORD arg7, DWORD arg8, DWORD arg9, DWORD arg10, DWORD arg11, DWORD arg12) \ | 
|---|
| 197 | {                                          \ | 
|---|
| 198 | DWORD ret;                             \ | 
|---|
| 199 | dprintf((DBGWRAP_MODULE": %s %x %x %x %x %x %x %x %x %x %x %x %x", #a, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12));         \ | 
|---|
| 200 | dbg_ThreadPushCall(#a); \ | 
|---|
| 201 | ret = ((DBG_WINPROC48)a)(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12);         \ | 
|---|
| 202 | dbg_ThreadPopCall(); \ | 
|---|
| 203 | dprintf((DBGWRAP_MODULE": %s returned %x", #a, ret)); \ | 
|---|
| 204 | return ret;                            \ | 
|---|
| 205 | } | 
|---|
| 206 |  | 
|---|
| 207 | #define DEBUGWRAP52(a) \ | 
|---|
| 208 | DWORD WIN32API Dbg##a(DWORD arg1, DWORD arg2, DWORD arg3, DWORD arg4, DWORD arg5, DWORD arg6, DWORD arg7, DWORD arg8, DWORD arg9, DWORD arg10, DWORD arg11, DWORD arg12, DWORD arg13) \ | 
|---|
| 209 | {                                          \ | 
|---|
| 210 | DWORD ret;                             \ | 
|---|
| 211 | dprintf((DBGWRAP_MODULE": %s %x %x %x %x %x %x %x %x %x %x %x %x %x", #a, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13));         \ | 
|---|
| 212 | dbg_ThreadPushCall(#a); \ | 
|---|
| 213 | ret = ((DBG_WINPROC52)a)(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13);         \ | 
|---|
| 214 | dbg_ThreadPopCall(); \ | 
|---|
| 215 | dprintf((DBGWRAP_MODULE": %s returned %x", #a, ret)); \ | 
|---|
| 216 | return ret;                            \ | 
|---|
| 217 | } | 
|---|
| 218 |  | 
|---|
| 219 | //level 2 logging | 
|---|
| 220 |  | 
|---|
| 221 | #define DEBUGWRAP_LVL2_0(a) \ | 
|---|
| 222 | DWORD WIN32API Dbg##a()             \ | 
|---|
| 223 | {                                          \ | 
|---|
| 224 | DWORD ret;                             \ | 
|---|
| 225 | dprintf2((DBGWRAP_MODULE": %s", #a));         \ | 
|---|
| 226 | dbg_ThreadPushCall(#a); \ | 
|---|
| 227 | ret = ((DBG_WINPROC0)a)();         \ | 
|---|
| 228 | dbg_ThreadPopCall(); \ | 
|---|
| 229 | dprintf2((DBGWRAP_MODULE": %s returned %x", #a, ret)); \ | 
|---|
| 230 | return ret;                            \ | 
|---|
| 231 | } | 
|---|
| 232 |  | 
|---|
| 233 | #define DEBUGWRAP_LVL2_4(a) \ | 
|---|
| 234 | DWORD WIN32API Dbg##a(DWORD arg1)             \ | 
|---|
| 235 | {                                          \ | 
|---|
| 236 | DWORD ret;                             \ | 
|---|
| 237 | dprintf2((DBGWRAP_MODULE": %s %x", #a, arg1));         \ | 
|---|
| 238 | dbg_ThreadPushCall(#a); \ | 
|---|
| 239 | ret = ((DBG_WINPROC4)a)(arg1);         \ | 
|---|
| 240 | dbg_ThreadPopCall(); \ | 
|---|
| 241 | dprintf2((DBGWRAP_MODULE": %s returned %x", #a, ret)); \ | 
|---|
| 242 | return ret;                            \ | 
|---|
| 243 | } | 
|---|
| 244 |  | 
|---|
| 245 | #define DEBUGWRAP_LVL2_8(a) \ | 
|---|
| 246 | DWORD WIN32API Dbg##a(DWORD arg1, DWORD arg2) \ | 
|---|
| 247 | {                                          \ | 
|---|
| 248 | DWORD ret;                             \ | 
|---|
| 249 | dprintf2((DBGWRAP_MODULE": %s %x %x", #a, arg1, arg2));         \ | 
|---|
| 250 | dbg_ThreadPushCall(#a); \ | 
|---|
| 251 | ret = ((DBG_WINPROC8)a)(arg1, arg2);         \ | 
|---|
| 252 | dbg_ThreadPopCall(); \ | 
|---|
| 253 | dprintf2((DBGWRAP_MODULE": %s returned %x", #a, ret)); \ | 
|---|
| 254 | return ret;                            \ | 
|---|
| 255 | } | 
|---|
| 256 |  | 
|---|
| 257 | #define DEBUGWRAP_LVL2_12(a) \ | 
|---|
| 258 | DWORD WIN32API Dbg##a(DWORD arg1, DWORD arg2, DWORD arg3) \ | 
|---|
| 259 | {                                          \ | 
|---|
| 260 | DWORD ret;                             \ | 
|---|
| 261 | dprintf2((DBGWRAP_MODULE": %s %x %x %x", #a, arg1, arg2, arg3));         \ | 
|---|
| 262 | dbg_ThreadPushCall(#a); \ | 
|---|
| 263 | ret = ((DBG_WINPROC12)a)(arg1, arg2, arg3);         \ | 
|---|
| 264 | dbg_ThreadPopCall(); \ | 
|---|
| 265 | dprintf2((DBGWRAP_MODULE": %s returned %x", #a, ret)); \ | 
|---|
| 266 | return ret;                            \ | 
|---|
| 267 | } | 
|---|
| 268 |  | 
|---|
| 269 | #define DEBUGWRAP_LVL2_16(a) \ | 
|---|
| 270 | DWORD WIN32API Dbg##a(DWORD arg1, DWORD arg2, DWORD arg3, DWORD arg4) \ | 
|---|
| 271 | {                                          \ | 
|---|
| 272 | DWORD ret;                             \ | 
|---|
| 273 | dprintf2((DBGWRAP_MODULE": %s %x %x %x %x", #a, arg1, arg2, arg3, arg4));         \ | 
|---|
| 274 | dbg_ThreadPushCall(#a); \ | 
|---|
| 275 | ret = ((DBG_WINPROC16)a)(arg1, arg2, arg3, arg4);         \ | 
|---|
| 276 | dbg_ThreadPopCall(); \ | 
|---|
| 277 | dprintf2((DBGWRAP_MODULE": %s returned %x", #a, ret)); \ | 
|---|
| 278 | return ret;                            \ | 
|---|
| 279 | } | 
|---|
| 280 |  | 
|---|
| 281 | #define DEBUGWRAP_LVL2_20(a) \ | 
|---|
| 282 | DWORD WIN32API Dbg##a(DWORD arg1, DWORD arg2, DWORD arg3, DWORD arg4, DWORD arg5) \ | 
|---|
| 283 | {                                          \ | 
|---|
| 284 | DWORD ret;                             \ | 
|---|
| 285 | dprintf2((DBGWRAP_MODULE": %s %x %x %x %x %x", #a, arg1, arg2, arg3, arg4, arg5));         \ | 
|---|
| 286 | dbg_ThreadPushCall(#a); \ | 
|---|
| 287 | ret = ((DBG_WINPROC20)a)(arg1, arg2, arg3, arg4, arg5);         \ | 
|---|
| 288 | dbg_ThreadPopCall(); \ | 
|---|
| 289 | dprintf2((DBGWRAP_MODULE": %s returned %x", #a, ret)); \ | 
|---|
| 290 | return ret;                            \ | 
|---|
| 291 | } | 
|---|
| 292 |  | 
|---|
| 293 | #define DEBUGWRAP_LVL2_24(a) \ | 
|---|
| 294 | DWORD WIN32API Dbg##a(DWORD arg1, DWORD arg2, DWORD arg3, DWORD arg4, DWORD arg5, DWORD arg6) \ | 
|---|
| 295 | {                                          \ | 
|---|
| 296 | DWORD ret;                             \ | 
|---|
| 297 | dprintf2((DBGWRAP_MODULE": %s %x %x %x %x %x %x", #a, arg1, arg2, arg3, arg4, arg5, arg6));         \ | 
|---|
| 298 | dbg_ThreadPushCall(#a); \ | 
|---|
| 299 | ret = ((DBG_WINPROC24)a)(arg1, arg2, arg3, arg4, arg5, arg6);         \ | 
|---|
| 300 | dbg_ThreadPopCall(); \ | 
|---|
| 301 | dprintf2((DBGWRAP_MODULE": %s returned %x", #a, ret)); \ | 
|---|
| 302 | return ret;                            \ | 
|---|
| 303 | } | 
|---|
| 304 |  | 
|---|
| 305 | #define DEBUGWRAP_LVL2_28(a) \ | 
|---|
| 306 | DWORD WIN32API Dbg##a(DWORD arg1, DWORD arg2, DWORD arg3, DWORD arg4, DWORD arg5, DWORD arg6, DWORD arg7) \ | 
|---|
| 307 | {                                          \ | 
|---|
| 308 | DWORD ret;                             \ | 
|---|
| 309 | dprintf2((DBGWRAP_MODULE": %s %x %x %x %x %x %x", #a, arg1, arg2, arg3, arg4, arg5, arg6, arg7));         \ | 
|---|
| 310 | dbg_ThreadPushCall(#a); \ | 
|---|
| 311 | ret = ((DBG_WINPROC28)a)(arg1, arg2, arg3, arg4, arg5, arg6, arg7);         \ | 
|---|
| 312 | dbg_ThreadPopCall(); \ | 
|---|
| 313 | dprintf2((DBGWRAP_MODULE": %s returned %x", #a, ret)); \ | 
|---|
| 314 | return ret;                            \ | 
|---|
| 315 | } | 
|---|
| 316 |  | 
|---|
| 317 | #define DEBUGWRAP_LVL2_32(a) \ | 
|---|
| 318 | DWORD WIN32API Dbg##a(DWORD arg1, DWORD arg2, DWORD arg3, DWORD arg4, DWORD arg5, DWORD arg6, DWORD arg7, DWORD arg8) \ | 
|---|
| 319 | {                                          \ | 
|---|
| 320 | DWORD ret;                             \ | 
|---|
| 321 | dprintf2((DBGWRAP_MODULE": %s %x %x %x %x %x %x", #a, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8));         \ | 
|---|
| 322 | dbg_ThreadPushCall(#a); \ | 
|---|
| 323 | ret = ((DBG_WINPROC32)a)(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);         \ | 
|---|
| 324 | dbg_ThreadPopCall(); \ | 
|---|
| 325 | dprintf2((DBGWRAP_MODULE": %s returned %x", #a, ret)); \ | 
|---|
| 326 | return ret;                            \ | 
|---|
| 327 | } | 
|---|
| 328 |  | 
|---|
| 329 | #define DEBUGWRAP_LVL2_36(a) \ | 
|---|
| 330 | DWORD WIN32API Dbg##a(DWORD arg1, DWORD arg2, DWORD arg3, DWORD arg4, DWORD arg5, DWORD arg6, DWORD arg7, DWORD arg8, DWORD arg9) \ | 
|---|
| 331 | {                                          \ | 
|---|
| 332 | DWORD ret;                             \ | 
|---|
| 333 | dprintf2((DBGWRAP_MODULE": %s %x %x %x %x %x %x", #a, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9));         \ | 
|---|
| 334 | dbg_ThreadPushCall(#a); \ | 
|---|
| 335 | ret = ((DBG_WINPROC36)a)(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9);         \ | 
|---|
| 336 | dbg_ThreadPopCall(); \ | 
|---|
| 337 | dprintf2((DBGWRAP_MODULE": %s returned %x", #a, ret)); \ | 
|---|
| 338 | return ret;                            \ | 
|---|
| 339 | } | 
|---|
| 340 |  | 
|---|
| 341 | #define DEBUGWRAP_LVL2_40(a) \ | 
|---|
| 342 | DWORD WIN32API Dbg##a(DWORD arg1, DWORD arg2, DWORD arg3, DWORD arg4, DWORD arg5, DWORD arg6, DWORD arg7, DWORD arg8, DWORD arg9, DWORD arg10) \ | 
|---|
| 343 | {                                          \ | 
|---|
| 344 | DWORD ret;                             \ | 
|---|
| 345 | dprintf2((DBGWRAP_MODULE": %s %x %x %x %x %x %x", #a, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10));         \ | 
|---|
| 346 | dbg_ThreadPushCall(#a); \ | 
|---|
| 347 | ret = ((DBG_WINPROC40)a)(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10);         \ | 
|---|
| 348 | dbg_ThreadPopCall(); \ | 
|---|
| 349 | dprintf2((DBGWRAP_MODULE": %s returned %x", #a, ret)); \ | 
|---|
| 350 | return ret;                            \ | 
|---|
| 351 | } | 
|---|
| 352 |  | 
|---|
| 353 | #define DEBUGWRAP_LVL2_44(a) \ | 
|---|
| 354 | DWORD WIN32API Dbg##a(DWORD arg1, DWORD arg2, DWORD arg3, DWORD arg4, DWORD arg5, DWORD arg6, DWORD arg7, DWORD arg8, DWORD arg9, DWORD arg10, DWORD arg11) \ | 
|---|
| 355 | {                                          \ | 
|---|
| 356 | DWORD ret;                             \ | 
|---|
| 357 | dprintf2((DBGWRAP_MODULE": %s %x %x %x %x %x %x", #a, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11));         \ | 
|---|
| 358 | dbg_ThreadPushCall(#a); \ | 
|---|
| 359 | ret = ((DBG_WINPROC44)a)(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11);         \ | 
|---|
| 360 | dbg_ThreadPopCall(); \ | 
|---|
| 361 | dprintf2((DBGWRAP_MODULE": %s returned %x", #a, ret)); \ | 
|---|
| 362 | return ret;                            \ | 
|---|
| 363 | } | 
|---|
| 364 |  | 
|---|
| 365 | #define DEBUGWRAP_LVL2_48(a) \ | 
|---|
| 366 | DWORD WIN32API Dbg##a(DWORD arg1, DWORD arg2, DWORD arg3, DWORD arg4, DWORD arg5, DWORD arg6, DWORD arg7, DWORD arg8, DWORD arg9, DWORD arg10, DWORD arg11, DWORD arg12) \ | 
|---|
| 367 | {                                          \ | 
|---|
| 368 | DWORD ret;                             \ | 
|---|
| 369 | dprintf2((DBGWRAP_MODULE": %s %x %x %x %x %x %x", #a, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12));         \ | 
|---|
| 370 | dbg_ThreadPushCall(#a); \ | 
|---|
| 371 | ret = ((DBG_WINPROC48)a)(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12);         \ | 
|---|
| 372 | dbg_ThreadPopCall(); \ | 
|---|
| 373 | dprintf2((DBGWRAP_MODULE": %s returned %x", #a, ret)); \ | 
|---|
| 374 | return ret;                            \ | 
|---|
| 375 | } | 
|---|
| 376 |  | 
|---|
| 377 | #define DEBUGWRAP_LVL2_52(a) \ | 
|---|
| 378 | DWORD WIN32API Dbg##a(DWORD arg1, DWORD arg2, DWORD arg3, DWORD arg4, DWORD arg5, DWORD arg6, DWORD arg7, DWORD arg8, DWORD arg9, DWORD arg10, DWORD arg11, DWORD arg12, DWORD arg13) \ | 
|---|
| 379 | {         \ | 
|---|
| 380 | DWORD ret;                                 \ | 
|---|
| 381 | dprintf2((DBGWRAP_MODULE": %s %x %x %x %x %x %x %x %x %x %x %x %x %x", #a, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13));         \ | 
|---|
| 382 | dbg_ThreadPushCall(#a); \ | 
|---|
| 383 | ret = ((DBG_WINPROC52)a)(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13);         \ | 
|---|
| 384 | dbg_ThreadPopCall(); \ | 
|---|
| 385 | dprintf2((DBGWRAP_MODULE": %s returned %x", #a, ret)); \ | 
|---|
| 386 | return ret; \ | 
|---|
| 387 | } | 
|---|
| 388 |  | 
|---|
| 389 |  | 
|---|
| 390 | //level 1 logging without function definitions | 
|---|
| 391 |  | 
|---|
| 392 | #define NODEF_DEBUGWRAP0(a) \ | 
|---|
| 393 | DWORD WIN32API a();  \ | 
|---|
| 394 | DWORD WIN32API Dbg##a()             \ | 
|---|
| 395 | {                                          \ | 
|---|
| 396 | DWORD ret;                             \ | 
|---|
| 397 | dprintf((DBGWRAP_MODULE": %s", #a));         \ | 
|---|
| 398 | dbg_ThreadPushCall(#a); \ | 
|---|
| 399 | ret = (DWORD)a();         \ | 
|---|
| 400 | dbg_ThreadPopCall(); \ | 
|---|
| 401 | dprintf((DBGWRAP_MODULE": %s returned %x", #a, ret)); \ | 
|---|
| 402 | return ret;                            \ | 
|---|
| 403 | } | 
|---|
| 404 |  | 
|---|
| 405 | #define NODEF_DEBUGWRAP0_NORET(a) \ | 
|---|
| 406 | void WIN32API a();  \ | 
|---|
| 407 | void WIN32API Dbg##a()             \ | 
|---|
| 408 | {                                          \ | 
|---|
| 409 | DWORD ret;                             \ | 
|---|
| 410 | dprintf((DBGWRAP_MODULE": %s", #a));         \ | 
|---|
| 411 | dbg_ThreadPushCall(#a); \ | 
|---|
| 412 | a();         \ | 
|---|
| 413 | dbg_ThreadPopCall(); \ | 
|---|
| 414 | } | 
|---|
| 415 |  | 
|---|
| 416 | #define NODEF_DEBUGWRAP4(a) \ | 
|---|
| 417 | DWORD WIN32API a(DWORD arg1);             \ | 
|---|
| 418 | DWORD WIN32API Dbg##a(DWORD arg1)             \ | 
|---|
| 419 | {                                          \ | 
|---|
| 420 | DWORD ret;                             \ | 
|---|
| 421 | dprintf((DBGWRAP_MODULE": %s %x", #a, arg1));         \ | 
|---|
| 422 | dbg_ThreadPushCall(#a); \ | 
|---|
| 423 | ret = ((DBG_WINPROC4)a)(arg1);         \ | 
|---|
| 424 | dbg_ThreadPopCall(); \ | 
|---|
| 425 | dprintf((DBGWRAP_MODULE": %s returned %x", #a, ret)); \ | 
|---|
| 426 | return ret;                            \ | 
|---|
| 427 | } | 
|---|
| 428 |  | 
|---|
| 429 | #define NODEF_DEBUGWRAP4_NORET(a) \ | 
|---|
| 430 | void WIN32API a(DWORD arg1);             \ | 
|---|
| 431 | void WIN32API Dbg##a(DWORD arg1)             \ | 
|---|
| 432 | {                                          \ | 
|---|
| 433 | dprintf((DBGWRAP_MODULE": %s %x", #a, arg1));         \ | 
|---|
| 434 | dbg_ThreadPushCall(#a); \ | 
|---|
| 435 | ((DBG_WINPROC4_NORET)a)(arg1);         \ | 
|---|
| 436 | dbg_ThreadPopCall(); \ | 
|---|
| 437 | } | 
|---|
| 438 |  | 
|---|
| 439 | #define NODEF_DEBUGWRAP8(a) \ | 
|---|
| 440 | DWORD WIN32API a(DWORD arg1, DWORD arg2); \ | 
|---|
| 441 | DWORD WIN32API Dbg##a(DWORD arg1, DWORD arg2) \ | 
|---|
| 442 | {                                          \ | 
|---|
| 443 | DWORD ret;                             \ | 
|---|
| 444 | dprintf((DBGWRAP_MODULE": %s %x %x", #a, arg1, arg2));         \ | 
|---|
| 445 | dbg_ThreadPushCall(#a); \ | 
|---|
| 446 | ret = ((DBG_WINPROC8)a)(arg1, arg2);         \ | 
|---|
| 447 | dbg_ThreadPopCall(); \ | 
|---|
| 448 | dprintf((DBGWRAP_MODULE": %s returned %x", #a, ret)); \ | 
|---|
| 449 | return ret;                            \ | 
|---|
| 450 | } | 
|---|
| 451 |  | 
|---|
| 452 | #define NODEF_DEBUGWRAP12(a) \ | 
|---|
| 453 | DWORD WIN32API a(DWORD arg1, DWORD arg2, DWORD arg3); \ | 
|---|
| 454 | DWORD WIN32API Dbg##a(DWORD arg1, DWORD arg2, DWORD arg3) \ | 
|---|
| 455 | {                                          \ | 
|---|
| 456 | DWORD ret;                             \ | 
|---|
| 457 | dprintf((DBGWRAP_MODULE": %s %x %x %x", #a, arg1, arg2, arg3));         \ | 
|---|
| 458 | dbg_ThreadPushCall(#a); \ | 
|---|
| 459 | ret = ((DBG_WINPROC12)a)(arg1, arg2, arg3);         \ | 
|---|
| 460 | dbg_ThreadPopCall(); \ | 
|---|
| 461 | dprintf((DBGWRAP_MODULE": %s returned %x", #a, ret)); \ | 
|---|
| 462 | return ret;                            \ | 
|---|
| 463 | } | 
|---|
| 464 |  | 
|---|
| 465 | #define NODEF_DEBUGWRAP16(a) \ | 
|---|
| 466 | DWORD WIN32API a(DWORD arg1, DWORD arg2, DWORD arg3, DWORD arg4); \ | 
|---|
| 467 | DWORD WIN32API Dbg##a(DWORD arg1, DWORD arg2, DWORD arg3, DWORD arg4) \ | 
|---|
| 468 | {                                          \ | 
|---|
| 469 | DWORD ret;                             \ | 
|---|
| 470 | dprintf((DBGWRAP_MODULE": %s %x %x %x %x", #a, arg1, arg2, arg3, arg4));         \ | 
|---|
| 471 | dbg_ThreadPushCall(#a); \ | 
|---|
| 472 | ret = ((DBG_WINPROC16)a)(arg1, arg2, arg3, arg4);         \ | 
|---|
| 473 | dbg_ThreadPopCall(); \ | 
|---|
| 474 | dprintf((DBGWRAP_MODULE": %s returned %x", #a, ret)); \ | 
|---|
| 475 | return ret;                            \ | 
|---|
| 476 | } | 
|---|
| 477 |  | 
|---|
| 478 | #define NODEF_DEBUGWRAP20(a) \ | 
|---|
| 479 | DWORD WIN32API a(DWORD arg1, DWORD arg2, DWORD arg3, DWORD arg4, DWORD arg5); \ | 
|---|
| 480 | DWORD WIN32API Dbg##a(DWORD arg1, DWORD arg2, DWORD arg3, DWORD arg4, DWORD arg5) \ | 
|---|
| 481 | {                                          \ | 
|---|
| 482 | DWORD ret;                             \ | 
|---|
| 483 | dprintf((DBGWRAP_MODULE": %s %x %x %x %x %x", #a, arg1, arg2, arg3, arg4, arg5));         \ | 
|---|
| 484 | dbg_ThreadPushCall(#a); \ | 
|---|
| 485 | ret = ((DBG_WINPROC20)a)(arg1, arg2, arg3, arg4, arg5);         \ | 
|---|
| 486 | dbg_ThreadPopCall(); \ | 
|---|
| 487 | dprintf((DBGWRAP_MODULE": %s returned %x", #a, ret)); \ | 
|---|
| 488 | return ret;                            \ | 
|---|
| 489 | } | 
|---|
| 490 |  | 
|---|
| 491 | #define NODEF_DEBUGWRAP24(a) \ | 
|---|
| 492 | DWORD WIN32API a(DWORD arg1, DWORD arg2, DWORD arg3, DWORD arg4, DWORD arg5, DWORD arg6); \ | 
|---|
| 493 | DWORD WIN32API Dbg##a(DWORD arg1, DWORD arg2, DWORD arg3, DWORD arg4, DWORD arg5, DWORD arg6) \ | 
|---|
| 494 | {                                          \ | 
|---|
| 495 | DWORD ret;                             \ | 
|---|
| 496 | dprintf((DBGWRAP_MODULE": %s %x %x %x %x %x %x", #a, arg1, arg2, arg3, arg4, arg5, arg6));         \ | 
|---|
| 497 | dbg_ThreadPushCall(#a); \ | 
|---|
| 498 | ret = ((DBG_WINPROC24)a)(arg1, arg2, arg3, arg4, arg5, arg6);         \ | 
|---|
| 499 | dbg_ThreadPopCall(); \ | 
|---|
| 500 | dprintf((DBGWRAP_MODULE": %s returned %x", #a, ret)); \ | 
|---|
| 501 | return ret;                            \ | 
|---|
| 502 | } | 
|---|
| 503 |  | 
|---|
| 504 | #define NODEF_DEBUGWRAP28(a) \ | 
|---|
| 505 | DWORD WIN32API a(DWORD arg1, DWORD arg2, DWORD arg3, DWORD arg4, DWORD arg5, DWORD arg6, DWORD arg7); \ | 
|---|
| 506 | DWORD WIN32API Dbg##a(DWORD arg1, DWORD arg2, DWORD arg3, DWORD arg4, DWORD arg5, DWORD arg6, DWORD arg7) \ | 
|---|
| 507 | {                                          \ | 
|---|
| 508 | DWORD ret;                             \ | 
|---|
| 509 | dprintf((DBGWRAP_MODULE": %s %x %x %x %x %x %x", #a, arg1, arg2, arg3, arg4, arg5, arg6, arg7));         \ | 
|---|
| 510 | dbg_ThreadPushCall(#a); \ | 
|---|
| 511 | ret = ((DBG_WINPROC28)a)(arg1, arg2, arg3, arg4, arg5, arg6, arg7);         \ | 
|---|
| 512 | dbg_ThreadPopCall(); \ | 
|---|
| 513 | dprintf((DBGWRAP_MODULE": %s returned %x", #a, ret)); \ | 
|---|
| 514 | return ret;                            \ | 
|---|
| 515 | } | 
|---|
| 516 |  | 
|---|
| 517 | #define NODEF_DEBUGWRAP32(a) \ | 
|---|
| 518 | DWORD WIN32API a(DWORD arg1, DWORD arg2, DWORD arg3, DWORD arg4, DWORD arg5, DWORD arg6, DWORD arg7, DWORD arg8); \ | 
|---|
| 519 | DWORD WIN32API Dbg##a(DWORD arg1, DWORD arg2, DWORD arg3, DWORD arg4, DWORD arg5, DWORD arg6, DWORD arg7, DWORD arg8) \ | 
|---|
| 520 | {                                          \ | 
|---|
| 521 | DWORD ret;                             \ | 
|---|
| 522 | dprintf((DBGWRAP_MODULE": %s %x %x %x %x %x %x", #a, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8));         \ | 
|---|
| 523 | dbg_ThreadPushCall(#a); \ | 
|---|
| 524 | ret = ((DBG_WINPROC32)a)(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);         \ | 
|---|
| 525 | dbg_ThreadPopCall(); \ | 
|---|
| 526 | dprintf((DBGWRAP_MODULE": %s returned %x", #a, ret)); \ | 
|---|
| 527 | return ret;                            \ | 
|---|
| 528 | } | 
|---|
| 529 |  | 
|---|
| 530 | #define NODEF_DEBUGWRAP36(a) \ | 
|---|
| 531 | DWORD WIN32API a(DWORD arg1, DWORD arg2, DWORD arg3, DWORD arg4, DWORD arg5, DWORD arg6, DWORD arg7, DWORD arg8, DWORD arg9); \ | 
|---|
| 532 | DWORD WIN32API Dbg##a(DWORD arg1, DWORD arg2, DWORD arg3, DWORD arg4, DWORD arg5, DWORD arg6, DWORD arg7, DWORD arg8, DWORD arg9) \ | 
|---|
| 533 | {                                          \ | 
|---|
| 534 | DWORD ret;                             \ | 
|---|
| 535 | dprintf((DBGWRAP_MODULE": %s %x %x %x %x %x %x", #a, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9));         \ | 
|---|
| 536 | dbg_ThreadPushCall(#a); \ | 
|---|
| 537 | ret = ((DBG_WINPROC36)a)(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9);         \ | 
|---|
| 538 | dbg_ThreadPopCall(); \ | 
|---|
| 539 | dprintf((DBGWRAP_MODULE": %s returned %x", #a, ret)); \ | 
|---|
| 540 | return ret;                            \ | 
|---|
| 541 | } | 
|---|
| 542 |  | 
|---|
| 543 | #define NODEF_DEBUGWRAP40(a) \ | 
|---|
| 544 | DWORD WIN32API a(DWORD arg1, DWORD arg2, DWORD arg3, DWORD arg4, DWORD arg5, DWORD arg6, DWORD arg7, DWORD arg8, DWORD arg9, DWORD arg10); \ | 
|---|
| 545 | DWORD WIN32API Dbg##a(DWORD arg1, DWORD arg2, DWORD arg3, DWORD arg4, DWORD arg5, DWORD arg6, DWORD arg7, DWORD arg8, DWORD arg9, DWORD arg10) \ | 
|---|
| 546 | {                                          \ | 
|---|
| 547 | DWORD ret;                             \ | 
|---|
| 548 | dprintf((DBGWRAP_MODULE": %s %x %x %x %x %x %x", #a, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10));         \ | 
|---|
| 549 | dbg_ThreadPushCall(#a); \ | 
|---|
| 550 | ret = ((DBG_WINPROC40)a)(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10);         \ | 
|---|
| 551 | dbg_ThreadPopCall(); \ | 
|---|
| 552 | dprintf((DBGWRAP_MODULE": %s returned %x", #a, ret)); \ | 
|---|
| 553 | return ret;                            \ | 
|---|
| 554 | } | 
|---|
| 555 |  | 
|---|
| 556 | #define NODEF_DEBUGWRAP44(a) \ | 
|---|
| 557 | DWORD WIN32API a(DWORD arg1, DWORD arg2, DWORD arg3, DWORD arg4, DWORD arg5, DWORD arg6, DWORD arg7, DWORD arg8, DWORD arg9, DWORD arg10, DWORD arg11); \ | 
|---|
| 558 | DWORD WIN32API Dbg##a(DWORD arg1, DWORD arg2, DWORD arg3, DWORD arg4, DWORD arg5, DWORD arg6, DWORD arg7, DWORD arg8, DWORD arg9, DWORD arg10, DWORD arg11) \ | 
|---|
| 559 | {                                          \ | 
|---|
| 560 | DWORD ret;                             \ | 
|---|
| 561 | dprintf((DBGWRAP_MODULE": %s %x %x %x %x %x %x", #a, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11));         \ | 
|---|
| 562 | dbg_ThreadPushCall(#a); \ | 
|---|
| 563 | ret = ((DBG_WINPROC44)a)(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11);         \ | 
|---|
| 564 | dbg_ThreadPopCall(); \ | 
|---|
| 565 | dprintf((DBGWRAP_MODULE": %s returned %x", #a, ret)); \ | 
|---|
| 566 | return ret;                            \ | 
|---|
| 567 | } | 
|---|
| 568 |  | 
|---|
| 569 | #define NODEF_DEBUGWRAP48(a) \ | 
|---|
| 570 | DWORD WIN32API a(DWORD arg1, DWORD arg2, DWORD arg3, DWORD arg4, DWORD arg5, DWORD arg6, DWORD arg7, DWORD arg8, DWORD arg9, DWORD arg10, DWORD arg11, DWORD arg12); \ | 
|---|
| 571 | DWORD WIN32API Dbg##a(DWORD arg1, DWORD arg2, DWORD arg3, DWORD arg4, DWORD arg5, DWORD arg6, DWORD arg7, DWORD arg8, DWORD arg9, DWORD arg10, DWORD arg11, DWORD arg12) \ | 
|---|
| 572 | {                                          \ | 
|---|
| 573 | DWORD ret;                             \ | 
|---|
| 574 | dprintf((DBGWRAP_MODULE": %s %x %x %x %x %x %x", #a, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12));         \ | 
|---|
| 575 | dbg_ThreadPushCall(#a); \ | 
|---|
| 576 | ret = ((DBG_WINPROC48)a)(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12);         \ | 
|---|
| 577 | dbg_ThreadPopCall(); \ | 
|---|
| 578 | dprintf((DBGWRAP_MODULE": %s returned %x", #a, ret)); \ | 
|---|
| 579 | return ret;                            \ | 
|---|
| 580 | } | 
|---|
| 581 |  | 
|---|
| 582 | #define NODEF_DEBUGWRAP52(a) \ | 
|---|
| 583 | DWORD WIN32API #a(DWORD arg1, DWORD arg2, DWORD arg3, DWORD arg4, DWORD arg5, DWORD arg6, DWORD arg7, DWORD arg8, DWORD arg9, DWORD arg10, DWORD arg11, DWORD arg12, DWORD arg13); \ | 
|---|
| 584 | DWORD WIN32API Dbg##a(DWORD arg1, DWORD arg2, DWORD arg3, DWORD arg4, DWORD arg5, DWORD arg6, DWORD arg7, DWORD arg8, DWORD arg9, DWORD arg10, DWORD arg11, DWORD arg12, DWORD arg13) \ | 
|---|
| 585 | {         \ | 
|---|
| 586 | DWORD ret;                                 \ | 
|---|
| 587 | dprintf((DBGWRAP_MODULE": %s %x %x %x %x %x %x %x %x %x %x %x %x %x", #a, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13));         \ | 
|---|
| 588 | dbg_ThreadPushCall(#a); \ | 
|---|
| 589 | ret = ((DBG_WINPROC52)a)(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13);         \ | 
|---|
| 590 | dbg_ThreadPopCall(); \ | 
|---|
| 591 | dprintf((DBGWRAP_MODULE": %s returned %x", #a, ret)); \ | 
|---|
| 592 | return ret; \ | 
|---|
| 593 | } | 
|---|
| 594 |  | 
|---|
| 595 | #endif | 
|---|
| 596 |  | 
|---|