This documentation is archived and is not being maintained.

Creating a Typical ISAPI Filter 

Once you are familiar with the benefits of ISAPI filters and how to use them, you can create a filter project using the ISAPI Extension Wizard. For more information about starting a new project using wizards, see Creating a Project with a Visual C++ Application Wizard. After the project has been created, you add your custom notification handlers. The steps are described below.

To add your filter processing

  1. Specify the notifications you want in GetFilterVersion.

    dwFlags will already contain the filters for events you specified in the ISAPI Extension Wizard.

  2. To add a new notification, add the filter flag to dwFlags in CHttpFilter::GetFilterVersion.

    1. Add the filter function declaration to the .h file.

    2. Add the filter definition to the .cpp file.

    You can remove notification flags and functions as well.

  3. To implement your filter functions, open the .cpp file and add custom handling for your chosen filter notifications by replacing the //TODO comments in the wizard-generated code.

  4. To add your filter to the registry, specify the full path and the name of your DLL.

    HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services/W3SVC/Parameters/FilterDLLs is the registry key where filters are specified. Multiple entries are separated by commas and are loaded in the order specified.

To debug your filter, if running Microsoft Internet Information Services

To load your filter, or to install a new version, if running Microsoft Internet Information Services

  • Shut down the WWW service, copy the new version of your DLL over the old one, and restart the service.

See Also