/********************************************************************/ /** Copyright(c) 1985-1997 Microsoft Corporation. **/ /********************************************************************/ //*** // // Filename: pnphand.c // // Description: Will receive and handle pnp notifications to add/remove devices // // History: May 11,1997 NarenG Created original version. // #include "ddm.h" #include "timer.h" #include "handlers.h" #include "objects.h" #include "util.h" #include "routerif.h" #include #include #include #include #include #include #include #include //** // // Call: DdmDevicePnpHandler // // Returns: NO_ERROR - Success // Non-zero returns - Failure // // Description: Will handle and act upon a device addition or removal. // DWORD DdmDevicePnpHandler( HANDLE pdwArg ) { PNP_EVENT_NOTIF * ppnpEvent = ( PPNP_EVENT_NOTIF )pdwArg; PPP_MESSAGE PppMessage; ZeroMemory( &PppMessage, sizeof( PppMessage ) ); PppMessage.dwMsgId = PPPDDMMSG_PnPNotification; PppMessage.ExtraInfo.DdmPnPNotification.PnPNotification = *ppnpEvent; SendPppMessageToDDM( &PppMessage ); LocalFree( ppnpEvent ); return( NO_ERROR ); } //** // // Call: ChangeNotificationEventHandler // // Returns: NO_ERROR - Success // Non-zero returns - Failure // // Description: // VOID ChangeNotificationEventHandler( VOID ) { DWORD dwRetCode; BOOL fIpAllowed = FALSE; DDMTRACE( "ChangeNotificationEventHandler called" ); dwRetCode = LoadDDMParameters( gblDDMConfigInfo.hkeyParameters, &fIpAllowed ); DeviceObjIterator( DeviceObjForceIpSec, FALSE, NULL ); if ( fIpAllowed && ( !gblDDMConfigInfo.fRasSrvrInitialized ) ) { DWORD i; BOOL bCalled = FALSE; for (i=0; i