IIS 5 & IIS 6
Timer Message in ISAPI Filter
Last post Apr 14, 2009 02:27 PM by _OK
Apr 08, 2009 06:31 PM|neeleshjjain|LINK
Can I have a windows timer message (WM_TIMER) in a ISAPI Filter. As I need to check some of the settings every 5 seconds, I thought of having a Timer message in the filter. Will it effect the performance of the IIS processing. I am using IIS 5.1
and the program is required for IIS 5.1 +.
Thanks in Advance,
Neelesh K J Jain.
Apr 08, 2009 06:48 PM|anilr|LINK
Use CreateTimerQueueTimer if you want a periodic timer.
Apr 14, 2009 02:27 PM|_OK|LINK
Or you can create a thread.
ThreadProc has for() loop - let it do the job than put it to sleep (for 5 sec)
You can also implement
TerminateFilter to close it gracefully
The good thing about it – if you need COM access you can
CoInitializeEx only once ;-)