예제 #1
0
PyObject* ClearEvents( void ) {
  PyObject *OutObj = NULL;
  CleanupEvents( gIData );
  OutObj = Py_BuildValue("(i)", 1);
  assert(OutObj);
  return OutObj;
}
예제 #2
0
void CleanupAll( IData *GS, double *ICs, double **Bds ) {
  int i = 0;
 
  if( Bds != NULL ) {
    for( i = 0; i < 2; i++ ) {
      if( Bds[i] != NULL ) {
	PyMem_Free( Bds[i] );
	Bds[i] = NULL;
      }
    }
    PyMem_Free( Bds );
    Bds = NULL;
  }

  if( ICs != NULL ) {
    PyMem_Free( ICs );
    ICs = NULL;
  }

  if( GS != NULL ) {
    CleanupRunParams( GS );
    CleanupExtInputs( GS );
    CleanupEvents( GS );
    CleanupIData( GS );
    CleanupBasic( GS );

    PyMem_Free(GS);
    GS = NULL;
 }
}
예제 #3
0
CXCreCredential::~CXCreCredential()
{		
	CleanupEvents();

	if (NULL != m_pWrappedCredential)
	{
		m_pWrappedCredential->Release();
		m_pWrappedCredential = NULL;
	}

	Release();
}
예제 #4
0
PyObject* ClearEvents( void ) {
  PyObject *OutObj = NULL;
  
  if( CleanupEvents( gIData ) ) {
    OutObj = Py_BuildValue("(i)", 1);
    assert(OutObj);
  }
  else {
    OutObj = Py_BuildValue("(i)", 0);
    assert(OutObj);
  }
  return OutObj;

}
예제 #5
0
// LogonUI calls this in order to give us a callback in case we need to notify it of 
// anything. We'll also provide it to the wrapped credential.
HRESULT CXCreCredential::Advise(
								  __in ICredentialProviderCredentialEvents* pcpce
								  )
{
	HRESULT hr = S_OK;

	CleanupEvents();

	//We keep a strong reference on the real ICredentialProviderCredentialEvents
	//to ensure that the weak reference held by the CWrappedCredentialEvents is valid.
	m_pCredProvCredentialEvents = pcpce;
	m_pCredProvCredentialEvents->AddRef();
	
	if (m_pWrappedCredential != NULL)
	{
		hr = m_pWrappedCredential->Advise(pcpce);
	}
	
	//get parent window HWND.
	hr = m_pCredProvCredentialEvents->OnCreatingWindow(&m_hParentWnd);		

	return hr;
}