Timer Message in ISAPI Filter [Answered]RSS

2 replies

Last post Apr 14, 2009 02:27 PM by _OK

  • Timer Message in ISAPI Filter

    Apr 08, 2009 06:31 PM|neeleshjjain|LINK

    Hello All,

        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.

    iis5.1 ISAPI Filters

  • Re: Timer Message in ISAPI Filter

    Apr 08, 2009 06:48 PM|anilr|LINK

    Use CreateTimerQueueTimer if you want a periodic timer.

    Anil Ruia
    Software Design Engineer
    IIS Core Server
  • Re: Timer Message in ISAPI Filter

    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 ;-)