src/SeeDll/Packet32.c
/*! 
  \brief Stops and unloads the WinPcap device driver.
  \return If the function succeeds, the return value is nonzero, otherwise it is zero.

  This function can be used to unload the driver from memory when the application no more needs it.
  Note that the driver is physically stopped and unloaded only when all the files on its devices 
  are closed, i.e. when all the applications that use WinPcap close all their adapters.
*/
\brief Stops and unloads the WinPcap device driver.
\return If the function succeeds, the return value is nonzero, otherwise it is zero.

This function can be used to unload the driver from memory when the application no more needs it.
Note that the driver is physically stopped and unloaded only when all the files on its devices
are closed, i.e. when all the applications that use WinPcap close all their adapters.
\ brief Stops and unloads the WinPcap device driver . \ return If the function succeeds the return value is nonzero otherwise it is zero . This function can be used to unload the driver from memory when the application no more needs it . Note that the driver is physically stopped and unloaded only when all the files on its devices are closed i . e . when all the applications that use WinPcap close all their adapters .
BOOL PacketStopDriver()
{
	SC_HANDLE		scmHandle;
    SC_HANDLE       schService;
    BOOL            ret;
    SERVICE_STATUS  serviceStatus;
	scmHandle = OpenSCManager(NULL, NULL, SC_MANAGER_ALL_ACCESS);
	if(scmHandle != NULL){
		schService = OpenService (scmHandle,
			NPFServiceName,
			SERVICE_ALL_ACCESS
			);
		if (schService != NULL)
		{
			ret = ControlService (schService,
				SERVICE_CONTROL_STOP,
				&serviceStatus
				);
			if (!ret)
			{
			}
			CloseServiceHandle (schService);
			CloseServiceHandle(scmHandle);
			return ret;
		}
	}
	return FALSE;
}
BOOL PacketStopDriver ( ) { SC_HANDLE scmHandle ; SC_HANDLE schService ; BOOL ret ; SERVICE_STATUS serviceStatus ; scmHandle = OpenSCManager ( NULL , NULL , SC_MANAGER_ALL_ACCESS ) ; if ( scmHandle != NULL ) { schService = OpenService ( scmHandle , NPFServiceName , SERVICE_ALL_ACCESS ) ; if ( schService != NULL ) { ret = ControlService ( schService , SERVICE_CONTROL_STOP , & serviceStatus ) ; if ( ! ret ) { } CloseServiceHandle ( schService ) ; CloseServiceHandle ( scmHandle ) ; return ret ; } } return FALSE ; }
\brief Stops and unloads the WinPcap device driver.
\ brief Stops and unloads the WinPcap device driver .