Web Filter Entry-Point Functions
Web filters for the Forefront TMG Web proxy may implement the following standard entry-point functions:
Web filters for the Forefront TMG Web proxy may implement the following entry points that are specific to Forefront TMG:
Note At a minimum, a Web filter must implement either GetFilterVersion and HttpFilterProc, or GetWPXFilterVersion and HttpWPXFilterProc (or both pairs of functions).
In addition, a Web filter may implement the TerminateFilter function.
These functions are described here briefly and in greater detail in Entry-Point Functions.
GetFilterVersion
The GetFilterVersion function is the first entry-point function called by Forefront TMG Web proxy on your Web filter. The Web proxy passes a pointer to an HTTP_FILTER_VERSION data structure, which can be used to supply key filter configuration information to the Web proxy. The most important information passed to the Web proxy is the bitmask that contains flags that specify which event notifications your filter can process. This function must be implemented together with HttpFilterProc.
HttpFilterProc
Whenever an event for which the filter has registered in GetFilterVersion occurs, the Forefront TMG Web proxy calls the HttpFilterProc function. The Web proxy uses this function to pass information and control to the Web filter. This function must be implemented together with GetFilterVersion.
GetWPXFilterVersion
The GetWPXFilterVersion function is called after the GetFilterVersion function (if it is implemented) to register for event notifications that are specific to Forefront TMG. The Web proxy passes a pointer to a HTTP_FILTER_VERSION data structure, which can be used to supply key filter configuration information to the Web proxy. The most important information passed to the Web proxy is the bitmask that contains flags that specify which event notifications your filter can process. This function must be implemented together with HttpWPXFilterProc.
HttpWPXFilterProc
Whenever an event specific to Forefront TMG for which the filter has registered in GetWPXFilterVersion occurs, the Forefront TMG Web proxy calls the HttpWPXFilterProc function. The Web proxy uses this function to pass information and control to the Web filter. This function must be implemented together with GetWPXFilterVersion.
TerminateFilter
This function indicates to the filter that it will be removed from memory. When this function is called, make sure that the filter closes any attachments it has made to system resources.
Note TerminateFilter is an optional function. However, you must provide this function if your filter needs to free any allocated or locked resources before being unloaded.
Build date: 7/12/2010