/*++ Copyright (c) 1998-2002 Microsoft Corporation. All rights reserved. --*/ #include "stdafx.h" #include "WebExeBlockFilterImpl.h" #include "WebExeBlockFilter.h" #include "OutputDebugStringF.h" CWebExeBlockFilter filter; BOOL WINAPI TerminateFilter(DWORD /*dwFlags*/) { DWORD dwError = filter.Shutdown(); if (dwError != ERROR_SUCCESS) { SetLastError(dwError); return FALSE; } return TRUE; } /* * * N o t i f i c a t i o n s D i s p a t c h e r s * */ DWORD WINAPI HttpFilterProc ( PHTTP_FILTER_CONTEXT pfc, DWORD notificationType, LPVOID pvNotification) { return filter.HttpFilterProc( pfc, notificationType, pvNotification); } DWORD WINAPI HttpWPXFilterProc ( PHTTP_FILTER_CONTEXT pfc, DWORD notificationType, LPVOID pvNotification) { return filter.HttpWpxFilterProc( pfc, notificationType, pvNotification); } /* * * R e g i s t e r i n g F o r N o t i f i c a t i o n s * */ BOOL WINAPI GetFilterVersion(PHTTP_FILTER_VERSION pVer) { OutputDebugStringF("WEBEXEBLOCK: Registering filter ISAPI notifications\n"); DWORD dwError = filter.Init(); if (dwError != ERROR_SUCCESS) { SetLastError(dwError); return (FALSE); } return (filter.RegisterISAPINotifications(pVer)); } BOOL WINAPI GetWPXFilterVersion(PHTTP_FILTER_VERSION pVer) { OutputDebugStringF("WEBEXEBLOCK: Registering filter WPX notifications\n"); DWORD dwError = filter.Init(); if (dwError != ERROR_SUCCESS) { SetLastError(dwError); return (FALSE); } return (filter.RegisterWpxNotifications(pVer)); } BOOL WINAPI ReloadWPXFilterConfiguration() { OutputDebugStringF("WEBEXEBLOCK: Reload filter configuration\n"); DWORD dwError = filter.Reload(); if (dwError != ERROR_SUCCESS) { SetLastError(dwError); return (FALSE); } return (TRUE); } /* * * - - - F i l t e r R e g i s t r a t i o n R o u t i n e s - - - * */ STDAPI DllRegisterServer(void) { return filter.Register(); } STDAPI DllUnregisterServer(void) { return filter.Unregister(); }