// dui-demo.cpp : main source file // #include "stdafx.h" #include "MainDlg.h" #include "LoginDlg.h" #include "SouiInit.h" #include "CApp.h" int WINAPI _tWinMain(HINSTANCE hInstance, HINSTANCE /*hPrevInstance*/, LPTSTR lpstrCmdLine, int /*nCmdShow*/) { HRESULT hRes = OleInitialize(NULL); SASSERT(SUCCEEDED(hRes)); int nRet = 0; new CApp(); CApp::getSingletonPtr()->Init(); CSouiLoader Loader(hInstance); InitSystemRes(Loader.GetApp(), Loader.GetComMgr()); InitUserRes(Loader.GetApp(), Loader.GetComMgr()); new SNotifyCenter(); nRet = Run(Loader.GetApp()); if (CApp::getSingletonPtr()->GetOut() == 1) { nRet = Run(Loader.GetApp()); } delete CApp::getSingletonPtr(); delete SNotifyCenter::getSingletonPtr(); OleUninitialize(); return nRet; }