Ejemplo n.º 1
0
void CVulEngine::_ScanVul(HWND hWnd)
{
	CWindowVulfixObserver observer(m_MainDlg, hWnd);
	
	if(m_pVulScan==NULL)
	{
		m_pVulScan = CreateVulFix();
	}
	m_pVulScan->SetObserver(&observer);
	m_pVulScan->Scan();

	if(m_pSoftVulScan==NULL)
	{
		m_pSoftVulScan = CreateSoftVulFix();
	}
	
	m_pVulScan->SetObserver(&observer);
	m_pSoftVulScan->Scan();
	_RelayMessage(hWnd, WMH_SCAN_DONE, 0, 0);
	
	m_pVulScan->SetObserver(NULL);
	m_pSoftVulScan->SetObserver(NULL);
}
Ejemplo n.º 2
0
void CVulEngine::_ScanFixed(HWND hWnd)
{
	DWORD dwFlags = _GetScanFlags();

	if(!m_pIVulFixed)
		m_pIVulFixed = CreateVulFixed();
	if(!m_pIVulFixedSoft)
		m_pIVulFixedSoft = CreateSoftVulFix();
	
	HRESULT hr = E_POINTER;
	if(m_pIVulFixed && m_pIVulFixedSoft)
	{
		CWindowVulfixObserver observer(hWnd);
		m_pIVulFixed->SetObserver(&observer);
		m_pIVulFixedSoft->SetObserver(&observer);
		_RelayMessage(hWnd, WMH_SCAN_FIXED_BEGIN, 0, 0 );
		hr = m_pIVulFixed->Scan( dwFlags );
		if( SUCCEEDED(hr) && !m_bVulFixedCanceled )
			hr = m_pIVulFixedSoft->Scan( dwFlags );
		m_pIVulFixed->SetObserver(NULL);
		m_pIVulFixedSoft->SetObserver(NULL);
	}
	_RelayMessage(hWnd, WMH_SCAN_FIXED_DONE, m_bVulFixedCanceled, hr );
}