Exemple #1
0
PpboxStream::~PpboxStream()
{
    assert(m_state == STATE_SHUTDOWN);
    SafeRelease(&m_pSource);

    DllRelease();
}
CCandidateList::~CCandidateList()
{
	_EndCandidateList();

	SafeRelease(&_pTextService);

	DllRelease();
}
 ~CFilterSample()
 {
     if (m_pReader)
     {
         m_pReader->Release();
     }
     DllRelease();
 }
WavSource::~WavSource()
{
    DllRelease();

    assert(m_IsShutdown);
    assert(m_nRefCount == 0);

    DeleteCriticalSection(&m_critSec);
}
CMultiOneTimePasswordProvider::~CMultiOneTimePasswordProvider()
{
	if (_rgpCredentials[0] != NULL)
    {
        _rgpCredentials[0]->Release();
    }

    DllRelease();
}
Exemple #6
0
 ~CFolderViewImplContextMenu()
 {
     // _punkSite should be NULL due to SetSite(NULL).
     if (_pdtobj)
     {
         _pdtobj->Release();
     }
     DllRelease();
 }
CSampleProvider::~CSampleProvider()
{
    if (_pCredential != NULL)
    {
        _pCredential->Release();
        _pCredential = NULL;
    }

    DllRelease();
}
CMessageCredential::~CMessageCredential()
{
    for (int i = 0; i < ARRAYSIZE(_rgFieldStrings); i++)
    {
        CoTaskMemFree(_rgFieldStrings[i]);
        CoTaskMemFree(_rgCredProvFieldDescriptors[i].pszLabel);
    }

    DllRelease();
}
CTotpProvider::~CTotpProvider()
{
    _CleanUpAllCredentials();
    
    if (_pWrappedProvider)
    {
        _pWrappedProvider->Release();
    }

    DllRelease();
}
CMultiOneTimePasswordResyncProvider::~CMultiOneTimePasswordResyncProvider()
{
    for (size_t i = 0; i < _dwNumCreds; i++)
    {
        if (_rgpCredentials[i] != NULL)
        {
            _rgpCredentials[i]->Release();
        }
    }

    DllRelease();
}
TapLockProvider::~TapLockProvider()
{
	if (_ptlc != NULL)
	{
		_ptlc->Release();
	}
    if (_ptll != NULL)
	{
        delete _ptll;
	}
    DllRelease();
}
CSampleProvider::~CSampleProvider()
{
    _CleanUpAllCredentials();
    
    if (_pWrappedProvider)
    {
        _pWrappedProvider->Release();
    }

    DllRelease();
    CLIB_LogMessage(L"CSampleProvider::~CSampleProvider()");
}
RfidProvider::~RfidProvider()
{
	for (size_t i = 0; i < _dwNumCreds; i++)
	{
		if (_rgpCredentials[i] != NULL)
		{
			_rgpCredentials[i]->Release();
		}
	}

	DllRelease();
}
Credential::~Credential()
{
    if (debug.is_open()) debug.close();

    for (int i = 0; i < ARRAYSIZE(_rgFieldStrings); i++)
    {
        CoTaskMemFree(_rgFieldStrings[i]);
        CoTaskMemFree(_rgCredProvFieldDescriptors[i].pszLabel);
    }

    DllRelease();
}
COpenOTPCredential::~COpenOTPCredential()
{
	if (_rgFieldStrings[SFI_OTP_USERNAME])
    {
        // CoTaskMemFree (below) deals with NULL, but StringCchLength does not.
        size_t lenUsername = lstrlen(_rgFieldStrings[SFI_OTP_USERNAME]);
        SecureZeroMemory(_rgFieldStrings[SFI_OTP_USERNAME], lenUsername * sizeof(*_rgFieldStrings[SFI_OTP_USERNAME]));
    }
    if (_rgFieldStrings[SFI_OTP_LDAP_PASS])
    {
        // CoTaskMemFree (below) deals with NULL, but StringCchLength does not.
        size_t lenPassword = lstrlen(_rgFieldStrings[SFI_OTP_LDAP_PASS]);
        SecureZeroMemory(_rgFieldStrings[SFI_OTP_LDAP_PASS], lenPassword * sizeof(*_rgFieldStrings[SFI_OTP_LDAP_PASS]));
    }
	if (_rgFieldStrings[SFI_OTP_PASS])
    {
        // CoTaskMemFree (below) deals with NULL, but StringCchLength does not.
        size_t lenPassword = lstrlen(_rgFieldStrings[SFI_OTP_PASS]);
        SecureZeroMemory(_rgFieldStrings[SFI_OTP_PASS], lenPassword * sizeof(*_rgFieldStrings[SFI_OTP_PASS]));
    }
	if (_rgFieldStrings[SFI_OTP_CHALLENGE])
    {
        // CoTaskMemFree (below) deals with NULL, but StringCchLength does not.
        size_t lenPassword = lstrlen(_rgFieldStrings[SFI_OTP_CHALLENGE]);
        SecureZeroMemory(_rgFieldStrings[SFI_OTP_CHALLENGE], lenPassword * sizeof(*_rgFieldStrings[SFI_OTP_CHALLENGE]));
    }
    for (int i = 0; i < ARRAYSIZE(_rgFieldStrings); i++)
    {
        CoTaskMemFree(_rgFieldStrings[i]);
        CoTaskMemFree(_rgCredProvFieldDescriptors[i].pszLabel);
    }

	/// Make sure _openotp-runtime is clean
	ZERO(_openotp_server_url);
	ZERO(_openotp_cert_file);
	ZERO(_openotp_ca_file);
	ZERO(_openotp_client_id);
	ZERO(_openotp_default_domain);
	ZERO(_openotp_user_settings);
	ZERO(_openotp_login_text);

	SecureZeroMemory(_openotp_cert_password, sizeof(_openotp_cert_password));

	_ClearOpenOTPLoginReqRep(&_openotp_login_request, &_openotp_login_response);
	_ClearOpenOTPChallengeReqRep(NULL, &_openotp_challenge_response);

	// DISABLE OPENOTP IN EVERY CASE
	_openotp_is_challenge_request = false;
	openotp_terminate(NULL);
	///

	DllRelease();
}
 IFACEMETHODIMP LockServer(BOOL fLock)
 {
     if (fLock)
     {
         DllAddRef();
     }
     else
     {
         DllRelease();
     }
     return S_OK;
 }
 IFACEMETHODIMP LockServer(__in BOOL bLock)
 {
     if (bLock)
     {
         DllAddRef();
     }
     else
     {
         DllRelease();
     }
     return S_OK;
 }
ContextMenu::~ContextMenu()
{
	delete m_appPath;

	DeleteObject(m_hbmp);

    if (m_pdtobj)
    {
        m_pdtobj->Release();
    }

    DllRelease();
}
STDMETHODIMP CClassFactory::LockServer(__in BOOL fLock)
{
    if (fLock == TRUE)
    {
       DllAddRef();
    }
    else
    {
       DllRelease();
    }
    return S_OK;

} //*** CClassFactory::LockServer
Exemple #20
0
CCandidateWindow::~CCandidateWindow()
{
	if(_pCandidateWindow != nullptr)
	{
		_pCandidateWindow->_EndUIElement();
		_pCandidateWindow->_Destroy();
	}
	SafeRelease(&_pCandidateWindow);

	SafeRelease(&_pCandidateList);
	SafeRelease(&_pTextService);

	DllRelease();
}
CSampleProvider::~CSampleProvider()
{
    if (_pCredential != NULL)
    {
        _pCredential->Release();
        _pCredential = NULL;
    }

    if (_pPipeListener != NULL)
    {
        delete _pPipeListener;
    }

    DllRelease();
}
CSampleCredential::~CSampleCredential()
{
    if (_rgFieldStrings[SFI_PASSWORD])
    {
        size_t lenPassword = lstrlen(_rgFieldStrings[SFI_PASSWORD]);
        SecureZeroMemory(_rgFieldStrings[SFI_PASSWORD], lenPassword * sizeof(*_rgFieldStrings[SFI_PASSWORD]));
    }
    for (int i = 0; i < ARRAYSIZE(_rgFieldStrings); i++)
    {
        CoTaskMemFree(_rgFieldStrings[i]);
        CoTaskMemFree(_rgCredProvFieldDescriptors[i].pszLabel);
    }

    DllRelease();
}
CardUnlockProvider::~CardUnlockProvider()
{
    if (_pCredential != NULL)
    {
        _pCredential->Release();
        _pCredential = NULL;
    }

	if (_rfidListener != NULL)
    {
		_rfidListener->Disconnect(); // End all listener events
		delete _rfidListener;
    }

    DllRelease();
}
MultiotpProvider::~MultiotpProvider()
{
	/*
    if (_pCredential != nullptr)
    {
        _pCredential->Release();
        _pCredential = nullptr;
    }
	*/
    _ReleaseEnumeratedCredentials();
    if (_pCredProviderUserArray != nullptr)
    {
        _pCredProviderUserArray->Release();
        _pCredProviderUserArray = nullptr;
    }
	if (DEVELOP_MODE) PrintLn("========== MultiotpProvider destroyed ==========");
    DllRelease();
}
COpenOTPProvider::~COpenOTPProvider()
{
	/*
    for (size_t i = 0; i < _dwNumCreds; i++)
    {
        if (_rgpCredentials[i] != NULL)
        {
            _rgpCredentials[i]->Release();
        }
    }
	*/

	if (_rgpCredentials[0] != NULL)
    {
        _rgpCredentials[0]->Release();
    }

    DllRelease();
}
FormTagManager::~FormTagManager(void)
{
	::PrintLog(L"FormTagManager.~ctor.");

	if( p_instance_ != NULL )
	{
		delete p_instance_;
		p_instance_ = 0;
	}

	_hbrBkgnd = NULL;

	if ( NULL != _sysImgList )
	{
		long cRef = _sysImgList->Release();
		if( cRef == 0 )
		{
			_sysImgList = NULL;
		}
	}

	DllRelease();
}
CCustomCredential::~CCustomCredential()
{
    /*if (_rgFieldStrings[SFI_PASSWORD])
    {
        // CoTaskMemFree (below) deals with NULL, but StringCchLength does not.
        size_t lenPassword;
        HRESULT hr = StringCchLengthW(_rgFieldStrings[SFI_PASSWORD], 128, &(lenPassword));
        if (SUCCEEDED(hr))
        {
            SecureZeroMemory(_rgFieldStrings[SFI_PASSWORD], lenPassword * sizeof(*_rgFieldStrings[SFI_PASSWORD]));
        }
        else
        {
            // TODO: Determine how to handle count error here.
        }
    }*/
    for (int i = 0; i < ARRAYSIZE(_rgCredProvFieldDescriptors); i++)
    {
        //CoTaskMemFree(_rgFieldStrings[i]);
        CoTaskMemFree(_rgCredProvFieldDescriptors[i].pszLabel);
    }

    DllRelease();
}
CEnumDisplayAttributeInfo::~CEnumDisplayAttributeInfo()
{
    DllRelease();
}
CTextService::~CTextService()
{
    DllRelease();
}
//----------------------------------------------------------------------------
//
//  Description:
//      Destructor.
//
//----------------------------------------------------------------------------
CClassFactory::~CClassFactory()
{
    DllRelease();

} //*** CClassFactory::~CClassFactory