示例#1
0
void CGuiServer::Stop(bool abDeinitialize/*=false*/)
{
	//120122 - Теперь через PipeServer
	if (mp_GuiServer)
	{
		ShutdownGuiStep(L"mp_GuiServer->StopPipeServer");

		mp_GuiServer->StopPipeServer(false, mb_GuiForcedTermination);

		if (abDeinitialize)
		{
			free(mp_GuiServer);
			mp_GuiServer = NULL;
		}

		ShutdownGuiStep(L"mp_GuiServer->StopPipeServer - done");
	}

	if (mp_GuiServerPID)
	{
		ShutdownGuiStep(L"mp_GuiServerPID->StopPipeServer");

		mp_GuiServerPID->StopPipeServer(false, mb_GuiForcedTermination);

		if (abDeinitialize)
		{
			free(mp_GuiServerPID);
			mp_GuiServerPID = NULL;
		}

		ShutdownGuiStep(L"mp_GuiServerPID->StopPipeServer - done");
	}
}
示例#2
0
void CGuiServer::Stop(bool abDeinitialize/*=false*/)
{
	//120122 - Теперь через PipeServer
	if (mp_GuiServer)
	{
		ShutdownGuiStep(L"mp_GuiServer->StopPipeServer");

		mp_GuiServer->StopPipeServer(false);

		if (abDeinitialize)
		{
			free(mp_GuiServer);
			mp_GuiServer = NULL;
		}

		ShutdownGuiStep(L"mp_GuiServer->StopPipeServer - done");
	}
}
示例#3
0
void CConEmuChild::PostOnVConClosed()
{
	// Must be called FOR VALID objects ONLY (guared from outside)!
	CVirtualConsole* pVCon = (CVirtualConsole*)this;
	if (CVConGroup::isValid(pVCon)
		&& !InterlockedExchange(&this->mn_MsgVConTerminated, gn_MsgVConTerminated))
	{
		ShutdownGuiStep(L"ProcessVConClosed - repost");
		PostMessage(this->mh_WndDC, gn_MsgVConTerminated, 0, (LPARAM)pVCon);
	}

#ifdef _DEBUG
	// Must be guarded and thats why valid...
	int iRef = pVCon->RefCount();
	_ASSERTE(CVConGroup::isValid(pVCon) || (iRef>=1 && iRef<10));
#endif
}
示例#4
0
void CConEmuChild::ProcessVConClosed(CVirtualConsole* apVCon, BOOL abPosted /*= FALSE*/)
{
	_ASSERTE(apVCon);

	if (!CVConGroup::isValid(apVCon))
		return;

	if (!abPosted)
	{
		apVCon->PostOnVConClosed();
		//PostMessage(ghWnd, mn_MsgVConTerminated, 0, (LPARAM)apVCon);
		return;
	}

	CVConGroup::OnVConClosed(apVCon);

	// Передернуть главный таймер, а то GUI долго думает, если ни одной консоли уже не осталось
	if (!CVConGroup::isVConExists(0))
		gpConEmu->OnTimer(TIMER_MAIN_ID, 0);

	ShutdownGuiStep(L"ProcessVConClosed - done");
}