Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

770 lines
22 KiB

  1. /*++
  2. *
  3. * WOW v1.0
  4. *
  5. * Copyright (c) 1991, Microsoft Corporation
  6. *
  7. * WUTMR.C
  8. * WOW32 16-bit User Timer API support
  9. *
  10. * History:
  11. * Created 07-Mar-1991 by Jeff Parsons (jeffpar)
  12. * 24-Feb-1993 reworked to use array of timer functions - barryb
  13. --*/
  14. #include "precomp.h"
  15. #pragma hdrstop
  16. MODNAME(wutmr.c);
  17. LIST_ENTRY TimerList;
  18. // Element Zero is unused.
  19. STATIC PTMR aptmrWOWTimers[] = {
  20. NULL, NULL, NULL, NULL,
  21. NULL, NULL, NULL, NULL,
  22. NULL, NULL, NULL, NULL,
  23. NULL, NULL, NULL, NULL,
  24. NULL, NULL, NULL, NULL,
  25. NULL, NULL, NULL, NULL,
  26. NULL, NULL, NULL, NULL,
  27. NULL, NULL, NULL, NULL,
  28. NULL, NULL, NULL
  29. };
  30. STATIC TIMERPROC afnTimerFuncs[] = {
  31. NULL, W32Timer1, W32Timer2, W32Timer3,
  32. W32Timer4, W32Timer5, W32Timer6, W32Timer7,
  33. W32Timer8, W32Timer9, W32Timer10, W32Timer11,
  34. W32Timer12, W32Timer13, W32Timer14, W32Timer15,
  35. W32Timer16, W32Timer17, W32Timer18, W32Timer19,
  36. W32Timer20, W32Timer21, W32Timer22, W32Timer23,
  37. W32Timer24, W32Timer25, W32Timer26, W32Timer27,
  38. W32Timer28, W32Timer29, W32Timer30, W32Timer31,
  39. W32Timer32, W32Timer33, W32Timer34
  40. };
  41. /* Timer mapping functions
  42. *
  43. * The basic 16-bit timer mapping operations are Add, Find and Free. When
  44. * a 16-bit app calls SetTimer, we call Win32's SetTimer with W32TimerProc
  45. * in place of the 16-bit proc address. Assuming the timer is successfully
  46. * allocated, we add the timer to our own table, recording the 16-bit proc
  47. * address.
  48. */
  49. //
  50. // Search for a timer by its 16-bit information. Looks in the list of
  51. // active timers. If the timer is found by this routine, then SetTimer()
  52. // has been called and KillTimer() has not yet been called.
  53. //
  54. PTMR IsDuplicateTimer16(HWND16 hwnd16, HTASK16 htask16, WORD wIDEvent)
  55. {
  56. register PTMR ptmr;
  57. register INT iTimer;
  58. //
  59. // Excel calls SetTimer with hwnd==NULL but dispatches the
  60. // WM_TIMER messages with hwnd!=NULL. so call it a match if
  61. // hwnd16!=NULL and ptmr->hwnd16==NULL
  62. //
  63. for (iTimer=1; iTimer<NUMEL(aptmrWOWTimers); iTimer++) {
  64. ptmr = aptmrWOWTimers[iTimer];
  65. if (ptmr) {
  66. if (LOWORD(ptmr->dwEventID) == wIDEvent &&
  67. ptmr->htask16 == htask16 &&
  68. (ptmr->hwnd16 == hwnd16 || !ptmr->hwnd16)) {
  69. return ptmr;
  70. }
  71. }
  72. }
  73. return NULL;
  74. }
  75. //
  76. // This is called to free *ALL* timers created with a given hwnd16
  77. // ie. All timers created by SetTimer(hwnd != NULL, id, duration)
  78. // This should only be called when the hwnd is being destroyed: DestroyWindow()
  79. //
  80. VOID FreeWindowTimers16(HWND hwnd32)
  81. {
  82. register PTMR ptmr;
  83. register INT iTimer;
  84. HAND16 htask16;
  85. htask16 = CURRENTPTD()->htask16;
  86. for (iTimer=1; iTimer<NUMEL(aptmrWOWTimers); iTimer++) {
  87. ptmr = aptmrWOWTimers[iTimer];
  88. if (ptmr) {
  89. if (ptmr->htask16 == htask16 && GETHWND16(hwnd32) == ptmr->hwnd16) {
  90. // we can't wait for Win32 to kill the timer for us during its
  91. // normal DestroyWindow() handling because it might send another
  92. // WM_TIMER message which we are now not ready to handle.
  93. KillTimer(ptmr->hwnd32, ptmr->dwEventID);
  94. // now free our WOW structures supporting this timer
  95. FreeTimer16(ptmr);
  96. }
  97. }
  98. }
  99. }
  100. //
  101. // Search for a timer by its 32-bit information. Looks in the list of
  102. // all timers (including those that have already been killed by KillTimer().
  103. //
  104. //
  105. PTMR FindTimer32(HWND16 hwnd16, DWORD dwIDEvent)
  106. {
  107. register PTMR ptmr;
  108. HAND16 htask16;
  109. htask16 = CURRENTPTD()->htask16;
  110. //
  111. // Excel calls SetTimer with hwnd==NULL but dispatches the
  112. // WM_TIMER messages with hwnd!=NULL. so call it a match if
  113. // hwnd16!=NULL and ptmr->hwnd16==NULL
  114. //
  115. for (ptmr = (PTMR)TimerList.Flink; ptmr != (PTMR)&TimerList; ptmr = (PTMR)ptmr->TmrList.Flink) {
  116. if (ptmr->dwEventID == dwIDEvent &&
  117. ptmr->htask16 == htask16 &&
  118. (ptmr->hwnd16 == hwnd16 || (hwnd16 && !ptmr->hwnd16))) {
  119. return ptmr;
  120. }
  121. }
  122. return (PTMR)NULL;
  123. }
  124. //
  125. // Search for a timer by its 16-bit information. Looks in the list of
  126. // all timers (including those that have already been killed by KillTimer().
  127. //
  128. //
  129. PTMR FindTimer16(HWND16 hwnd16, HTASK16 htask16, WORD wIDEvent)
  130. {
  131. register PTMR ptmr;
  132. //
  133. // Excel calls SetTimer with hwnd==NULL but dispatches the
  134. // WM_TIMER messages with hwnd!=NULL. so call it a match if
  135. // hwnd16!=NULL and ptmr->hwnd16==NULL
  136. //
  137. for (ptmr = (PTMR)TimerList.Flink; ptmr != (PTMR)&TimerList; ptmr = (PTMR)ptmr->TmrList.Flink) {
  138. if (LOWORD(ptmr->dwEventID) == wIDEvent &&
  139. ptmr->htask16 == htask16 &&
  140. (ptmr->hwnd16 == hwnd16 || (hwnd16 && !ptmr->hwnd16))) {
  141. return ptmr;
  142. }
  143. }
  144. return (PTMR)NULL;
  145. }
  146. //
  147. // Search for a killed timer by its 16-bit information.
  148. //
  149. //
  150. PTMR FindKilledTimer16(HWND16 hwnd16, HTASK16 htask16, WORD wIDEvent)
  151. {
  152. register PTMR ptmr;
  153. for (ptmr = (PTMR)TimerList.Flink; ptmr != (PTMR)&TimerList; ptmr = (PTMR)ptmr->TmrList.Flink) {
  154. if (ptmr->wIndex == 0 &&
  155. ptmr->htask16 == htask16 &&
  156. ptmr->hwnd16 == hwnd16 &&
  157. (LOWORD(ptmr->dwEventID) == wIDEvent || !hwnd16)) {
  158. // 1. the timer has been killed and
  159. // 2. the timer is in this task and
  160. // 3. the hwnds match (both might be 0) and
  161. // 4. the IDs match, or the hwnds are both 0 (in that case,
  162. // IDs are ignored)
  163. return ptmr;
  164. }
  165. }
  166. return (PTMR)NULL;
  167. }
  168. VOID FreeTimer16(PTMR ptmr)
  169. {
  170. WOW32ASSERT(ptmr->wIndex == 0 || ptmr == aptmrWOWTimers[ptmr->wIndex]);
  171. aptmrWOWTimers[ptmr->wIndex] = NULL;
  172. RemoveEntryList(&ptmr->TmrList);
  173. free_w(ptmr);
  174. }
  175. VOID DestroyTimers16(HTASK16 htask16)
  176. {
  177. PTMR ptmr, next;
  178. for (ptmr = (PTMR)TimerList.Flink; ptmr != (PTMR)&TimerList; ptmr = next) {
  179. next = (PTMR)ptmr->TmrList.Flink;
  180. if (ptmr->htask16 == htask16) {
  181. //
  182. // don't call KillTimer() if the timer was associated with
  183. // a window and the window is gone, USER has already
  184. // cleaned it up.
  185. //
  186. if (ptmr == aptmrWOWTimers[ptmr->wIndex] && (!ptmr->hwnd32 || IsWindow(ptmr->hwnd32))) {
  187. if ( KillTimer(ptmr->hwnd32, ptmr->dwEventID) ) {
  188. LOGDEBUG(LOG_IMPORTANT,
  189. ("DestroyTimers16:Killed %04x\n",ptmr->dwEventID));
  190. } else {
  191. LOGDEBUG(LOG_ERROR,
  192. ("DestroyTimers16:FAILED %04x\n",ptmr->dwEventID));
  193. }
  194. }
  195. FreeTimer16(ptmr);
  196. }
  197. }
  198. }
  199. VOID W32TimerFunc(UINT index, HWND hwnd, UINT idEvent, DWORD dwTime)
  200. {
  201. PARM16 Parm16;
  202. register PTMR ptmr;
  203. ptmr = aptmrWOWTimers[index];
  204. if ( !ptmr ) {
  205. LOGDEBUG(LOG_ALWAYS,(" W32TimerFunc ERROR: cannot find timer %08x\n", idEvent));
  206. return;
  207. }
  208. if (ptmr->dwEventID != idEvent) {
  209. //
  210. // This is an extra timer message which was already in the message
  211. // queue when the app called KillTimer(). The PTMR isn't in the
  212. // array, but it is still linked into the TimerList.
  213. //
  214. LOGDEBUG(LOG_WARNING,(" W32TimerFunc WARNING: Timer %08x called after KillTimer()\n", idEvent));
  215. for (ptmr = (PTMR)TimerList.Flink; ptmr != (PTMR)&TimerList; ptmr = (PTMR)ptmr->TmrList.Flink) {
  216. if (ptmr->dwEventID == idEvent) {
  217. break;
  218. }
  219. }
  220. if ( ptmr == (PTMR)&TimerList ) {
  221. LOGDEBUG(LOG_ALWAYS,(" W32TimerFunc ERROR: cannot find timer %08x (second case)\n", idEvent));
  222. return;
  223. }
  224. }
  225. Parm16.WndProc.hwnd = ptmr->hwnd16;
  226. Parm16.WndProc.wMsg = WM_TIMER;
  227. Parm16.WndProc.wParam = LOWORD(ptmr->dwEventID);
  228. Parm16.WndProc.lParam = dwTime;
  229. Parm16.WndProc.hInst = 0; // callback16 defaults to ss
  230. CallBack16(RET_WNDPROC, &Parm16, ptmr->vpfnTimerProc, NULL);
  231. }
  232. /*++
  233. BOOL KillTimer(<hwnd>, <nIDEvent>)
  234. HWND <hwnd>;
  235. INT <nIDEvent>;
  236. The %KillTimer% function kills the timer event identified by the <hwnd> and
  237. <nIDEvent> parameters. Any pending WM_TIMER messages associated with the
  238. timer are removed from the message queue.
  239. <hwnd>
  240. Identifies the window associated with the given timer event. This must
  241. be the same value passed as the hwnd parameter to the SetTimer function
  242. call that created the timer event.
  243. <nIDEvent>
  244. Specifies the timer event to be killed. If the application called
  245. %SetTimer% with the <hwnd> parameter set to NULL, this must be the event
  246. identifier returned by %SetTimer%. If the <hwnd> parameter of %SetTimer%
  247. was a valid window handle, <nIDEvent> must be the value of the
  248. <nIDEvent> parameter passed to %SetTimer%.
  249. The return value specifies the outcome of the function. It is TRUE if the
  250. event was killed. It is FALSE if the %KillTimer% function could not find the
  251. specified timer event.
  252. --*/
  253. ULONG FASTCALL WU32KillTimer(PVDMFRAME pFrame)
  254. {
  255. ULONG ul;
  256. register PTMR ptmr;
  257. register PKILLTIMER16 parg16;
  258. HWND16 hwnd16;
  259. WORD wIDEvent;
  260. HAND16 htask16;
  261. GETARGPTR(pFrame, sizeof(KILLTIMER16), parg16);
  262. htask16 = CURRENTPTD()->htask16;
  263. hwnd16 = (HWND16)parg16->f1;
  264. wIDEvent = parg16->f2;
  265. ptmr = IsDuplicateTimer16(hwnd16, htask16, wIDEvent);
  266. if (ptmr) {
  267. ul = GETBOOL16(KillTimer(ptmr->hwnd32, ptmr->dwEventID));
  268. aptmrWOWTimers[ptmr->wIndex] = NULL;
  269. ptmr->wIndex = 0;
  270. }
  271. else {
  272. ul = 0;
  273. LOGDEBUG(LOG_IMPORTANT,(" WU32KillTimer ERROR: cannot find timer %04x\n", wIDEvent));
  274. }
  275. FREEARGPTR(parg16);
  276. RETURN(ul);
  277. }
  278. /*++
  279. WORD SetTimer(<hwnd>, <nIDEvent>, <wElapse>, <lpTimerFunc>)
  280. HWND <hwnd>;
  281. int <nIDEvent>;
  282. WORD <wElapse>;
  283. FARPROC <lpTimerFunc>;
  284. The %SetTimer% function creates a system timer event. When a timer event
  285. occurs, Windows passes a WM_TIMER message to the application-supplied
  286. function specified by the <lpTimerFunc> parameter. The function can then
  287. process the event. A NULL value for <lpTimerFunc> causes WM_TIMER messages
  288. to be placed in the application queue.
  289. <hwnd>
  290. Identifies the window to be associated with the timer. If hwnd is NULL,
  291. no window is associated with the timer.
  292. <nIDEvent>
  293. Specifies a nonzero timer-event identifier if the <hwnd> parameter
  294. is not NULL.
  295. <wElapse>
  296. Specifies the elapsed time (in milliseconds) between timer
  297. events.
  298. <lpTimerFunc>
  299. Is the procedure-instance address of the function to be
  300. notified when the timer event takes place. If <lpTimerFunc> is NULL, the
  301. WM_TIMER message is placed in the application queue, and the %hwnd%
  302. member of the %MSG% structure contains the <hwnd> parameter given in the
  303. %SetTimer% function call. See the following Comments section for
  304. details.
  305. The return value specifies the integer identifier for the new timer event.
  306. If the <hwnd> parameter is NULL, an application passes this value to the
  307. %KillTimer% function to kill the timer event. The return value is zero if
  308. the timer was not created.
  309. Timers are a limited global resource; therefore, it is important that an
  310. application check the value returned by the %SetTimer% function to verify
  311. that a timer is actually available.
  312. To install a timer function, %SetTimer% must receive a procedure-instance
  313. address of the function, and the function must be exported in the
  314. application's module-definition file. A procedure-instance address can be
  315. created using the %MakeProcInstance% function.
  316. The callback function must use the Pascal calling convention and must be
  317. declared %FAR%.
  318. Callback Function:
  319. WORD FAR PASCAL <TimerFunc>(<hwnd>, <wMsg>, <nIDEvent>, <dwTime>)
  320. HWND <hwnd>;
  321. WORD <wMsg>;
  322. int <nIDEvent>;
  323. DWORD <dwTime>;
  324. <TimerFunc> is a placeholder for the application-supplied function name. The
  325. actual name must be exported by including it in an %EXPORTS% statement in
  326. the application's module-definition file.
  327. <hwnd>
  328. Identifies the window associated with the timer event.
  329. <wMsg>
  330. Specifies the WM_TIMER message.
  331. <nIDEvent>
  332. Specifies the timer's ID.
  333. <dwTime>
  334. Specifies the current system time.
  335. --*/
  336. ULONG FASTCALL WU32SetTimer(PVDMFRAME pFrame)
  337. {
  338. ULONG ul;
  339. register PTMR ptmr;
  340. register PSETTIMER16 parg16;
  341. HWND16 hwnd16;
  342. WORD wIDEvent;
  343. WORD wElapse;
  344. DWORD vpfnTimerProc;
  345. DWORD dwTimerProc32;
  346. HAND16 htask16;
  347. INT iTimer;
  348. GETARGPTR(pFrame, sizeof(SETTIMER16), parg16);
  349. ul = 0;
  350. htask16 = CURRENTPTD()->htask16;
  351. hwnd16 = (HWND16)parg16->f1;
  352. wIDEvent = parg16->f2;
  353. wElapse = parg16->f3;
  354. // Don't allow WOW apps to set a timer with a period of less than
  355. // 55 ms. Myst and Winstone depend on this.
  356. if (wElapse < 55) wElapse = 55;
  357. vpfnTimerProc = VPFN32(parg16->f4);
  358. ptmr = IsDuplicateTimer16(hwnd16, htask16, wIDEvent);
  359. if (!ptmr) {
  360. // Loop through the slots in the timer array
  361. iTimer = 2;
  362. while (iTimer < NUMEL(aptmrWOWTimers)) {
  363. /*
  364. ** Find a slot in the arrays for which
  365. ** no pointer has yet been allocated.
  366. */
  367. if ( !aptmrWOWTimers[iTimer] ) {
  368. //
  369. // See if there is already thunking information for this
  370. // timer. If there is, delete it from the list of timer
  371. // info and re-use its memory because this new timer
  372. // superceeds the old thunking information.
  373. //
  374. ptmr = FindKilledTimer16(hwnd16, htask16, wIDEvent);
  375. if (ptmr) {
  376. RemoveEntryList(&ptmr->TmrList);
  377. } else {
  378. // Allocate a TMR structure for the new timer
  379. ptmr = malloc_w(sizeof(TMR));
  380. }
  381. aptmrWOWTimers[iTimer] = ptmr;
  382. if (!ptmr) {
  383. LOGDEBUG(LOG_ALWAYS,(" WOW32 ERROR: TMR allocation failure\n"));
  384. return 0;
  385. }
  386. break; // Fall out into initialization code
  387. }
  388. iTimer++;
  389. }
  390. if (iTimer >= NUMEL(aptmrWOWTimers)) {
  391. LOGDEBUG(LOG_ALWAYS,(" WOW32 ERROR: out of timer slots\n"));
  392. return 0;
  393. }
  394. // Initialize the constant parts of the TMR structure (done on 1st SetTimer)
  395. InsertHeadList(&TimerList, &ptmr->TmrList);
  396. ptmr->hwnd16 = hwnd16;
  397. ptmr->hwnd32 = HWND32(hwnd16);
  398. ptmr->htask16 = htask16;
  399. ptmr->wIndex = (WORD)iTimer;
  400. }
  401. // Setup the changeable parts of the TMR structure (done for every SetTimer)
  402. if (vpfnTimerProc) {
  403. dwTimerProc32 = (DWORD)afnTimerFuncs[ptmr->wIndex];
  404. } else {
  405. dwTimerProc32 = (DWORD)NULL;
  406. }
  407. ptmr->vpfnTimerProc = vpfnTimerProc;
  408. ptmr->dwTimerProc32 = dwTimerProc32;
  409. ul = SetTimer(
  410. ptmr->hwnd32,
  411. (UINT)wIDEvent,
  412. (UINT)wElapse,
  413. (TIMERPROC)dwTimerProc32 );
  414. //
  415. // USER-generated timerID's are between 0x100 and 0x7fff
  416. //
  417. WOW32ASSERT(HIWORD(ul) == 0);
  418. if (ul) {
  419. ptmr->dwEventID = ul;
  420. //
  421. // when hwnd!=NULL and nEventID==0 the API returns 1 to
  422. // indicate success but the timer's ID is 0 as requested.
  423. //
  424. if (!wIDEvent && ptmr->hwnd32)
  425. ptmr->dwEventID = 0;
  426. } else {
  427. // Since the real SetTimer failed, free
  428. // our local data using simply our own timer ID
  429. FreeTimer16(ptmr);
  430. }
  431. FREEARGPTR(parg16);
  432. RETURN(ul);
  433. }
  434. VOID CALLBACK W32Timer1(HWND hwnd, UINT msg, UINT idEvent, DWORD dwTime)
  435. {
  436. WOW32ASSERT(msg == WM_TIMER);
  437. W32TimerFunc(1, hwnd, idEvent, dwTime);
  438. }
  439. VOID CALLBACK W32Timer2(HWND hwnd, UINT msg, UINT idEvent, DWORD dwTime)
  440. {
  441. WOW32ASSERT(msg == WM_TIMER);
  442. W32TimerFunc(2, hwnd, idEvent, dwTime);
  443. }
  444. VOID CALLBACK W32Timer3(HWND hwnd, UINT msg, UINT idEvent, DWORD dwTime)
  445. {
  446. WOW32ASSERT(msg == WM_TIMER);
  447. W32TimerFunc(3, hwnd, idEvent, dwTime);
  448. }
  449. VOID CALLBACK W32Timer4(HWND hwnd, UINT msg, UINT idEvent, DWORD dwTime)
  450. {
  451. WOW32ASSERT(msg == WM_TIMER);
  452. W32TimerFunc(4, hwnd, idEvent, dwTime);
  453. }
  454. VOID CALLBACK W32Timer5(HWND hwnd, UINT msg, UINT idEvent, DWORD dwTime)
  455. {
  456. WOW32ASSERT(msg == WM_TIMER);
  457. W32TimerFunc(5, hwnd, idEvent, dwTime);
  458. }
  459. VOID CALLBACK W32Timer6(HWND hwnd, UINT msg, UINT idEvent, DWORD dwTime)
  460. {
  461. WOW32ASSERT(msg == WM_TIMER);
  462. W32TimerFunc(6, hwnd, idEvent, dwTime);
  463. }
  464. VOID CALLBACK W32Timer7(HWND hwnd, UINT msg, UINT idEvent, DWORD dwTime)
  465. {
  466. WOW32ASSERT(msg == WM_TIMER);
  467. W32TimerFunc(7, hwnd, idEvent, dwTime);
  468. }
  469. VOID CALLBACK W32Timer8(HWND hwnd, UINT msg, UINT idEvent, DWORD dwTime)
  470. {
  471. WOW32ASSERT(msg == WM_TIMER);
  472. W32TimerFunc(8, hwnd, idEvent, dwTime);
  473. }
  474. VOID CALLBACK W32Timer9(HWND hwnd, UINT msg, UINT idEvent, DWORD dwTime)
  475. {
  476. WOW32ASSERT(msg == WM_TIMER);
  477. W32TimerFunc(9, hwnd, idEvent, dwTime);
  478. }
  479. VOID CALLBACK W32Timer10(HWND hwnd, UINT msg, UINT idEvent, DWORD dwTime)
  480. {
  481. WOW32ASSERT(msg == WM_TIMER);
  482. W32TimerFunc(10, hwnd, idEvent, dwTime);
  483. }
  484. VOID CALLBACK W32Timer11(HWND hwnd, UINT msg, UINT idEvent, DWORD dwTime)
  485. {
  486. WOW32ASSERT(msg == WM_TIMER);
  487. W32TimerFunc(11, hwnd, idEvent, dwTime);
  488. }
  489. VOID CALLBACK W32Timer12(HWND hwnd, UINT msg, UINT idEvent, DWORD dwTime)
  490. {
  491. WOW32ASSERT(msg == WM_TIMER);
  492. W32TimerFunc(12, hwnd, idEvent, dwTime);
  493. }
  494. VOID CALLBACK W32Timer13(HWND hwnd, UINT msg, UINT idEvent, DWORD dwTime)
  495. {
  496. WOW32ASSERT(msg == WM_TIMER);
  497. W32TimerFunc(13, hwnd, idEvent, dwTime);
  498. }
  499. VOID CALLBACK W32Timer14(HWND hwnd, UINT msg, UINT idEvent, DWORD dwTime)
  500. {
  501. WOW32ASSERT(msg == WM_TIMER);
  502. W32TimerFunc(14, hwnd, idEvent, dwTime);
  503. }
  504. VOID CALLBACK W32Timer15(HWND hwnd, UINT msg, UINT idEvent, DWORD dwTime)
  505. {
  506. WOW32ASSERT(msg == WM_TIMER);
  507. W32TimerFunc(15, hwnd, idEvent, dwTime);
  508. }
  509. VOID CALLBACK W32Timer16(HWND hwnd, UINT msg, UINT idEvent, DWORD dwTime)
  510. {
  511. WOW32ASSERT(msg == WM_TIMER);
  512. W32TimerFunc(16, hwnd, idEvent, dwTime);
  513. }
  514. VOID CALLBACK W32Timer17(HWND hwnd, UINT msg, UINT idEvent, DWORD dwTime)
  515. {
  516. WOW32ASSERT(msg == WM_TIMER);
  517. W32TimerFunc(17, hwnd, idEvent, dwTime);
  518. }
  519. VOID CALLBACK W32Timer18(HWND hwnd, UINT msg, UINT idEvent, DWORD dwTime)
  520. {
  521. WOW32ASSERT(msg == WM_TIMER);
  522. W32TimerFunc(18, hwnd, idEvent, dwTime);
  523. }
  524. VOID CALLBACK W32Timer19(HWND hwnd, UINT msg, UINT idEvent, DWORD dwTime)
  525. {
  526. WOW32ASSERT(msg == WM_TIMER);
  527. W32TimerFunc(19, hwnd, idEvent, dwTime);
  528. }
  529. VOID CALLBACK W32Timer20(HWND hwnd, UINT msg, UINT idEvent, DWORD dwTime)
  530. {
  531. WOW32ASSERT(msg == WM_TIMER);
  532. W32TimerFunc(20, hwnd, idEvent, dwTime);
  533. }
  534. VOID CALLBACK W32Timer21(HWND hwnd, UINT msg, UINT idEvent, DWORD dwTime)
  535. {
  536. WOW32ASSERT(msg == WM_TIMER);
  537. W32TimerFunc(21, hwnd, idEvent, dwTime);
  538. }
  539. VOID CALLBACK W32Timer22(HWND hwnd, UINT msg, UINT idEvent, DWORD dwTime)
  540. {
  541. WOW32ASSERT(msg == WM_TIMER);
  542. W32TimerFunc(22, hwnd, idEvent, dwTime);
  543. }
  544. VOID CALLBACK W32Timer23(HWND hwnd, UINT msg, UINT idEvent, DWORD dwTime)
  545. {
  546. WOW32ASSERT(msg == WM_TIMER);
  547. W32TimerFunc(23, hwnd, idEvent, dwTime);
  548. }
  549. VOID CALLBACK W32Timer24(HWND hwnd, UINT msg, UINT idEvent, DWORD dwTime)
  550. {
  551. WOW32ASSERT(msg == WM_TIMER);
  552. W32TimerFunc(24, hwnd, idEvent, dwTime);
  553. }
  554. VOID CALLBACK W32Timer25(HWND hwnd, UINT msg, UINT idEvent, DWORD dwTime)
  555. {
  556. WOW32ASSERT(msg == WM_TIMER);
  557. W32TimerFunc(25, hwnd, idEvent, dwTime);
  558. }
  559. VOID CALLBACK W32Timer26(HWND hwnd, UINT msg, UINT idEvent, DWORD dwTime)
  560. {
  561. WOW32ASSERT(msg == WM_TIMER);
  562. W32TimerFunc(26, hwnd, idEvent, dwTime);
  563. }
  564. VOID CALLBACK W32Timer27(HWND hwnd, UINT msg, UINT idEvent, DWORD dwTime)
  565. {
  566. WOW32ASSERT(msg == WM_TIMER);
  567. W32TimerFunc(27, hwnd, idEvent, dwTime);
  568. }
  569. VOID CALLBACK W32Timer28(HWND hwnd, UINT msg, UINT idEvent, DWORD dwTime)
  570. {
  571. WOW32ASSERT(msg == WM_TIMER);
  572. W32TimerFunc(28, hwnd, idEvent, dwTime);
  573. }
  574. VOID CALLBACK W32Timer29(HWND hwnd, UINT msg, UINT idEvent, DWORD dwTime)
  575. {
  576. WOW32ASSERT(msg == WM_TIMER);
  577. W32TimerFunc(29, hwnd, idEvent, dwTime);
  578. }
  579. VOID CALLBACK W32Timer30(HWND hwnd, UINT msg, UINT idEvent, DWORD dwTime)
  580. {
  581. WOW32ASSERT(msg == WM_TIMER);
  582. W32TimerFunc(30, hwnd, idEvent, dwTime);
  583. }
  584. VOID CALLBACK W32Timer31(HWND hwnd, UINT msg, UINT idEvent, DWORD dwTime)
  585. {
  586. WOW32ASSERT(msg == WM_TIMER);
  587. W32TimerFunc(31, hwnd, idEvent, dwTime);
  588. }
  589. VOID CALLBACK W32Timer32(HWND hwnd, UINT msg, UINT idEvent, DWORD dwTime)
  590. {
  591. WOW32ASSERT(msg == WM_TIMER);
  592. W32TimerFunc(32, hwnd, idEvent, dwTime);
  593. }
  594. VOID CALLBACK W32Timer33(HWND hwnd, UINT msg, UINT idEvent, DWORD dwTime)
  595. {
  596. WOW32ASSERT(msg == WM_TIMER);
  597. W32TimerFunc(33, hwnd, idEvent, dwTime);
  598. }
  599. VOID CALLBACK W32Timer34(HWND hwnd, UINT msg, UINT idEvent, DWORD dwTime)
  600. {
  601. WOW32ASSERT(msg == WM_TIMER);
  602. W32TimerFunc(34, hwnd, idEvent, dwTime);
  603. }