Microsoft Internet Security and Acceleration Server 2000

IFWXFilterAdmin

The IFWXFilterAdmin interface is used by the filter for installation and configuration. You must use this interface to install a filter.

Notes to Implementers

Create an instance of the FWXFilterAdmin class to use these administration methods.

ISA Samples that Use IFWXFilterAdmin Methods

The method IFWXFilterAdmin::InstallFilter is used in the following samples provided with ISA:

The method IFWXFilterAdmin::UninstallFilter is used in the following samples provided with ISA:

The method IFWXFilterAdmin::RegisterProtocolForFilter is used in the following samples provided with ISA:

The method IFWXFilterAdmin::UnregisterProtocolForFilter is used in the following sample provided with ISA:

The method IFWXFilterAdmin::GetProtocol is used in the following samples provided with ISA:

The method IFWXFilterAdmin::GetFilterParameterSet is used in the following sample provided with ISA:

Example Code

The code for registering filters and protocols should be written in the .cpp file that represents the filter object. The filter uses this interface primarily in the DllInstall function.

Code for Registering the Filter

static HRESULT RegisterApplicationFilter(int fRegister, FwxScope Scope)
{
	HRESULT hr;
	CComPtr<IFWXFilterAdmin> pIFWXFilterAdmin;
	MSNEROOT::IFPCPtr comptrIFPC;
	MSNEROOT::IFPCEventDefinitionPtr  comptrIFPCEventDefinition;
	MSNEROOT::IFPCFilterProtocolPtr comptrIFPCFilterProtocol;

	hr = CoCreateInstance (CLSID_FWXFilterAdmin,
						 NULL,
						 CLSCTX_SERVER,
						 IID_IFWXFilterAdmin,
						 (LPVOID *) &pIFWXFilterAdmin);
	if (FAILED(hr))
		return hr;
}

Code for Protocol Registration

// HRESULT hr;
// IFWXFilterAdmin *ifa;
 
hr = ifa->RegisterProtocolForFilter(
	CLSID_FTPFilter,
	L"FTP",
	L"FTP protocol via ftpfltr filter",
	NULL,
	Scope);