Example #1
0
COleDocument::~COleDocument()
{
	ASSERT_VALID(this);

#ifdef _DEBUG
	if (!m_docItemList.IsEmpty())
		TRACE(traceOle, 0, "Warning: destroying COleDocument with %d doc items.\n",
			m_docItemList.GetCount());
#endif

	// remove all doc-items from the list before shutting down the storage
	POSITION pos = GetStartPosition();
	while (pos != NULL)
	{
		CDocItem* pItem = GetNextItem(pos);
		ASSERT(pItem != NULL);
		delete pItem;
	}

	// release the hold on the document storage
	RELEASE(m_lpRootStg);
	CoTaskMemFree(m_ptd);

	AfxOleUnlockApp();
}
Example #2
0
CStringCollect::~CStringCollect()
{
	// To terminate the application when all objects created with
	//  with OLE automation, the destructor calls AfxOleUnlockApp.

	AfxOleUnlockApp();
}
Example #3
0
CAutoClickPoint::~CAutoClickPoint()
{
    // To terminate the application when all objects created with
    //  with OLE automation, the destructor calls AfxOleUnlockApp.

    AfxOleUnlockApp();
}
Example #4
0
CSkinItemEdit::~CSkinItemEdit()
{
	// 为了在用 OLE 自动化创建所有对象后终止应用程序,
	// 	析构函数调用 AfxOleUnlockApp。
	
	AfxOleUnlockApp();
}
Example #5
0
CDispSimple::~CDispSimple()
{
	// 为了在用 OLE 自动化创建所有对象后终止应用程序,
	// 	析构函数调用 AfxOleUnlockApp。
	
	AfxOleUnlockApp();
}
Example #6
0
CSkinItemSlider::~CSkinItemSlider()
{
	// 为了在用 OLE 自动化创建所有对象后终止应用程序,
	// 	析构函数调用 AfxOleUnlockApp。
	
	AfxOleUnlockApp();
}
Example #7
0
CCalculate::~CCalculate()
{
	// To terminate the application when all objects created with
	// 	with OLE automation, the destructor calls AfxOleUnlockApp.
	
	AfxOleUnlockApp();
}
Example #8
0
CSkinWndBase::~CSkinWndBase()
{
	// 为了在用 OLE 自动化创建所有对象后终止应用程序,
	// 	析构函数调用 AfxOleUnlockApp。
	
	AfxOleUnlockApp();
}
Example #9
0
COleServerItem::~COleServerItem()
{
	m_bAutoDelete = FALSE;  // no delete during destructor

	// release any advise holders
	RELEASE(m_lpOleAdviseHolder);
	RELEASE(m_lpDataAdviseHolder);

	ExternalDisconnect();

	// disconnect from the document
	COleServerDoc* pDoc = GetDocument();
	if (pDoc != NULL)
	{
		// remove external lock from it
		if (m_bNeedUnlock)
		{
			pDoc->LockExternal(FALSE, TRUE);
			m_bNeedUnlock = FALSE;
		}

		// reset m_pEmbeddedItem if destroying embedded item
		if (pDoc->m_pEmbeddedItem == this)
			pDoc->m_pEmbeddedItem = NULL;

		// remove from list
		pDoc->RemoveItem(this);
	}

	// cleanup any references
	AfxOleUnlockApp();
}
Example #10
0
CSpaceship::~CSpaceship()
{
    TRACE("CSpaceship dtor\n");
    // To terminate the application when all objects created with
    //   OLE automation, the destructor calls AfxOleUnlockApp.
    
    AfxOleUnlockApp();
}
Example #11
0
CEVDetectionDlgAutoProxy::~CEVDetectionDlgAutoProxy()
{
	// 为了在用 OLE 自动化创建所有对象后终止应用程序,
	// 	析构函数调用 AfxOleUnlockApp。
	//  除了做其他事情外,这还将销毁主对话框
	if (m_pDialog != NULL)
		m_pDialog->m_pAutoProxy = NULL;
	AfxOleUnlockApp();
}
CMFC_ControlsDlgAutoProxy::~CMFC_ControlsDlgAutoProxy()
{
	// To terminate the application when all objects created with
	// 	with automation, the destructor calls AfxOleUnlockApp.
	//  Among other things, this will destroy the main dialog
	if (m_pDialog != NULL)
		m_pDialog->m_pAutoProxy = NULL;
	AfxOleUnlockApp();
}
Example #13
0
COpcC_Client::~COpcC_Client()
{
   AfxOleUnlockApp();
   if( opcServer.IsOk() )
      DoOpcDisconnect();
   testSink->Release(); // OLE should clean this up, but may not have time!
   callbackCP->Release();
   shutdownCP->Release();
   Sleep( 100 );
}
Example #14
0
CComponentObj::~CComponentObj()
{
	// To terminate the application when all objects created with
	// 	with OLE automation, the destructor calls AfxOleUnlockApp.

	ASSERT( registeractiveobjectret == 0 );
	GMEConsole::Console::gmeoleapp.Release();

	AfxOleUnlockApp();
}
Example #15
0
CText::~CText()
{
	// To terminate the application when all objects created with
	// 	with OLE automation, the destructor calls AfxOleUnlockApp.
	
	if(m_pchText != NULL) {
		delete [] m_pchText;
	}
	AfxOleUnlockApp();
}
CBenubirdAutoProxy::~CBenubirdAutoProxy()
{
	g_strDBG.Empty();
	g_strDBG.Format(_T("------------------------------------- end AutoProxy1  %X"),this);
	OutputDebugString(g_strDBG);

	// To terminate the application when all objects created with
	// 	with automation, the destructor calls AfxOleUnlockApp.
	//  Among other things, this will destroy the main dialog
	if (m_pDialog != NULL)
		m_pDialog->m_pAutoProxy = NULL;
	AfxOleUnlockApp();
}
Example #17
0
void CMainFrame::OnClose()
{
	if( GetApp()->ComparisonRunning() )
		return;

	CChildFrame* const pFrame = DYNAMIC_DOWNCAST( CChildFrame, MDIGetActive() );

	if (CloseAll(0))
	{
		CMDIFrameWndEx::OnClose();

		// bombs away! - unlock the app from ole automation references - be like word.application and go away when UI is closed
		while (!AfxOleCanExitApp())
			AfxOleUnlockApp();
	}
}
LONG CEventHandlerModule::Unlock()
{
	AfxOleUnlockApp();
	return 0;
}
LONG CDistributedGameTreeServerModule::Unlock()
{
	AfxOleUnlockApp();
	return 0;
}
Example #20
0
CReportObj::~CReportObj()
{
	AfxOleUnlockApp();
}
Example #21
0
CDoc::~CDoc()
{
	AfxOleUnlockApp();
}
CSTEditorDoc::~CSTEditorDoc ()
{
	AfxOleUnlockApp ();
}
COgreInMfcDoc::~COgreInMfcDoc()
{
	AfxOleUnlockApp();
}
Example #24
0
CMUSHclientDoc::~CMUSHclientDoc()
{
int i;

  // stop sounds playing, release sound buffers
  for (i = 0; i < MAX_SOUND_BUFFERS; i++)
    if (m_pDirectSoundSecondaryBuffer [i])
      {
      DWORD iStatus;
      if (SUCCEEDED (m_pDirectSoundSecondaryBuffer [i]->GetStatus (&iStatus)) &&
          (iStatus & DSBSTATUS_PLAYING))
        m_pDirectSoundSecondaryBuffer [i]->Stop ();

      m_pDirectSoundSecondaryBuffer [i]->Release ();
      }

  if (m_pTimerWnd)
    {
	  m_pTimerWnd->DestroyWindow();
	  delete m_pTimerWnd;
    m_pTimerWnd = NULL;
    }

  for (i = 0; i < 8; i++)  
    delete m_font [i];
  delete m_input_font;

  if (m_hNameLookup)
    WSACancelAsyncRequest (m_hNameLookup);  // cancel host name lookup in progress

  delete [] m_pGetHostStruct;   // delete buffer used by host name lookup

  delete m_MapFailureRegexp;    // delete regexp structure for mapping failures

	if (m_pSocket)
	{

    ShutDownSocket (*m_pSocket);

    delete m_pSocket;
    m_pSocket = NULL;

    }

	if (m_pChatListenSocket)
	{

    ShutDownSocket (*m_pChatListenSocket);

    delete m_pChatListenSocket;
    m_pChatListenSocket = NULL;

    }

  // UDP listening sockets
  for (map<int, UDPsocket *>::iterator udpSocketIterator = m_UDPsocketMap.begin ();
       udpSocketIterator != m_UDPsocketMap.end ();
       udpSocketIterator++)
      delete udpSocketIterator->second;

  // delete chat sessions

  DELETE_LIST (m_ChatList);

  // delete plugins

  // we have to do it this way, because otherwise if a plugin attempts to access the
  // plugin list (eg. BroadcastPlugin, Trace) during the delete operation, then it
  // may call a plugin that was deleted a moment ago, but is still in the list.

   for (PluginListIterator pit = m_PluginList.begin (); 
        pit != m_PluginList.end ();
        pit =  m_PluginList.erase (pit))    // erase from list and get next one
    delete *pit;  // delete *this* one

  CloseLog ();    // this writes out the log file postamble as well

// delete triggers
       
  DELETE_MAP (m_TriggerMap, CTrigger); 

// delete aliass

  DELETE_MAP (m_AliasMap, CAlias); 

// delete lines list

  DELETE_LIST (m_LineList);

// delete timer map

  DELETE_MAP (m_TimerMap, CTimer); 
  
// delete variables map

  DELETE_MAP (m_VariableMap, CVariable); 

// delete Element map

  DELETE_MAP (m_CustomElementMap, CElement); 

// delete active tags list

  DELETE_LIST (m_ActiveTagList);

// delete actions list

  DELETE_LIST (m_ActionList);


// get rid of our positions array

  delete [] m_pLinePositions;

// one less document

  gdoccount--;

// update activity window

  App.m_bUpdateActivity = TRUE;

// ****************** release scripting stuff

  DisableScripting ();

  if (!bWine)
  	AfxOleUnlockApp();        // not needed?

  // free compression stuff

  if (m_CompressOutput)
    free (m_CompressOutput);
  if (m_CompressInput)
    free (m_CompressInput);

  // don't wrap up if not initialised
  if (m_bCompressInitOK)
    inflateEnd (&m_zCompress);

  // don't need to know what the configuration was any more
  DeleteConfigurationArrays ();

  // delete our arrays
  for (tStringMapOfMaps::iterator it = m_Arrays.begin (); 
       it != m_Arrays.end ();
       it++)
         {
         tStringToStringMap * m = it->second;
         m->clear ();
         delete m;
         }

  // destroy accelerator table, if we had one
  if (m_accelerator)
    DestroyAcceleratorTable (m_accelerator);

  // if they loaded a special font, get rid of it
  RemoveSpecialFonts ();

#ifdef PANE

  // get rid of owned panes

  safe_for_each (m_PaneMap.begin (), m_PaneMap.end (), closepane);
#endif // PANE

  // delete MiniWindow map

  for (MiniWindowMapIterator mwit = m_MiniWindows.begin (); 
       mwit != m_MiniWindows.end ();
       mwit++)
         delete mwit->second;

  m_MiniWindowsOrder.clear ();

  // delete databases
  for (tDatabaseMapIterator dbit = m_Databases.begin (); 
       dbit != m_Databases.end ();
       dbit++)
         {
         if (dbit->second->pStmt)        // finalize any outstanding statement
           sqlite3_finalize(dbit->second->pStmt);
         if (dbit->second->db)           // and close the database
           sqlite3_close(dbit->second->db);
         delete dbit->second;      // now delete memory used by it
         }

}   // end of CMUSHclientDoc::~CMUSHclientDoc
Example #25
0
CAutoExeDoc::~CAutoExeDoc()
{
	AfxOleUnlockApp();
}
Example #26
0
C__TB_DataDoc::~C__TB_DataDoc()
{
	AfxOleUnlockApp();
}
Example #27
0
CColorEyeIDoc::~CColorEyeIDoc()
{
    AfxOleUnlockApp();
}
Example #28
0
CMysnifferDoc::~CMysnifferDoc()
{
	AfxOleUnlockApp();
}
Example #29
0
LONG CUPlayBackModule::Unlock()
{
    AfxOleUnlockApp();
    return 0;
}
Example #30
0
CDevObjDoc::~CDevObjDoc()
{
	AfxOleUnlockApp();
}