示例#1
0
int COpenHoldemApp::ExitInstance()
{
	DeleteAllSingletons();
	stop_log();
	Scintilla_ReleaseResources();
	return CWinApp::ExitInstance();
}
示例#2
0
int WINAPI _tWinMain(HINSTANCE hInstance, HINSTANCE /*hPrevInstance*/, LPTSTR lpstrCmdLine, int nCmdShow)
{
	HRESULT hRes = ::CoInitialize(NULL);
// If you are running on NT 4.0 or higher you can use the following call instead to 
// make the EXE free threaded. This means that calls come in on a random RPC thread.
//	HRESULT hRes = ::CoInitializeEx(NULL, COINIT_MULTITHREADED);
	ATLASSERT(SUCCEEDED(hRes));
	WSADATA wsaData;
	WSAStartup(MAKEWORD(2,2), &wsaData);
	Scintilla_RegisterClasses(hInstance);

	// this resolves ATL window thunking problem when Microsoft Layer for Unicode (MSLU) is used
	::DefWindowProc(NULL, 0, 0, 0L);

	AtlInitCommonControls(ICC_COOL_CLASSES | ICC_BAR_CLASSES);	// add flags to support other controls

	hRes = _Module.Init(NULL, hInstance);
	ATLASSERT(SUCCEEDED(hRes));

	int nRet = Run(lpstrCmdLine, nCmdShow);

	_Module.Term();
	Scintilla_ReleaseResources();
	WSACleanup();
	::CoUninitialize();

	return nRet;
}
示例#3
0
int InformApp::ExitInstance()
{
  // Clear the bitmap cache
  std::map<std::string,CDibSection*>::iterator it;
  for (it = m_bitmaps.begin(); it != m_bitmaps.end(); ++it)
    delete it->second;

  GameWindow::ExitInstance();
  TabDoc::ExitInstance();
  SpellCheck::Finalize();
  Scintilla_ReleaseResources();

  return CWinApp::ExitInstance();
}
示例#4
0
int CReClass2011App::ExitInstance()
{
	if (m_hMDIMenu != NULL)	FreeResource(m_hMDIMenu);
	if (m_hMDIAccel != NULL)FreeResource(m_hMDIAccel);
	AfxOleTerm(FALSE);

	// Release Scintilla
	Scintilla_ReleaseResources();

	WriteProfileInt("Colors","crBackground",crBackground);
	WriteProfileInt("Colors","crSelect",crSelect);
	WriteProfileInt("Colors","crHidden",crHidden);

	WriteProfileInt("Colors","crOffset",crOffset);
	WriteProfileInt("Colors","crAddress",crAddress);
	WriteProfileInt("Colors","crType",crType);
	WriteProfileInt("Colors","crName",crName);
	WriteProfileInt("Colors","crIndex",crIndex);
	WriteProfileInt("Colors","crValue",crValue);
	WriteProfileInt("Colors","crComment",crComment);

	WriteProfileInt("Colors","crVTable",crVTable);
	WriteProfileInt("Colors","crFunction",crFunction);
	WriteProfileInt("Colors","crChar",crChar);
	WriteProfileInt("Colors","crCustom",crCustom);
	WriteProfileInt("Colors","crHex",crHex);

	WriteProfileInt("Display","gbOffset",gbOffset);
	WriteProfileInt("Display","gbAddress",gbAddress);
	WriteProfileInt("Display","gbText",gbText);

	WriteProfileInt("Display","gbFloat",gbFloat);
	WriteProfileInt("Display","gbInt",gbInt);
	WriteProfileInt("Display","gbString",gbString);
	WriteProfileInt("Display","gbPointers",gbPointers);

	WriteProfileInt("Display","gbTop",gbTop);
	WriteProfileInt("Display","gbClassBrowser",gbClassBrowser);
	WriteProfileInt("Display","gbFilterProcesses",gbFilterProcesses);

	return CWinAppEx::ExitInstance();
}
示例#5
0
文件: General.cpp 项目: jaquadro/XLua
BOOL WINAPI DllMain(HINSTANCE hDLL, DWORD dwReason, LPVOID lpReserved)
{

	/*conditionsInfos = getConditionInfos();
	actionsInfos = getActionInfos();
	expressionsInfos = getExpressionInfos();
	
	ConditionJumps = getConditions();
	ActionJumps = getActions();
	ExpressionJumps = getExpressions();*/
	
	switch (dwReason)
	{
		// DLL is attaching to the address space of the current process.
		case DLL_PROCESS_ATTACH:
			
			hInstLib = hDLL; // Store HINSTANCE
			break;

		// A new thread is being created in the current process.
		case DLL_THREAD_ATTACH:
			break;

		// A thread is exiting cleanly.
		case DLL_THREAD_DETACH:
			break;

		// The calling process is detaching the DLL from its address space.
	    case DLL_PROCESS_DETACH:
#ifndef RUN_ONLY
			Scintilla_ReleaseResources();
#endif
			break;
	}
	
	return TRUE;
}
示例#6
0
FireFly::~FireFly()
{
	Scintilla_ReleaseResources();
}