SProxy.cpp 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. // dui-demo.cpp : main source file
  2. //
  3. #include "stdafx.h"
  4. #include "MainDlg.h"
  5. #include "LoginDlg.h"
  6. #include "SouiInit.h"
  7. #include "CApp.h"
  8. int WINAPI _tWinMain(HINSTANCE hInstance, HINSTANCE /*hPrevInstance*/, LPTSTR lpstrCmdLine, int /*nCmdShow*/)
  9. {
  10. HRESULT hRes = OleInitialize(NULL);
  11. SASSERT(SUCCEEDED(hRes));
  12. int nRet = 0;
  13. new CApp();
  14. CSouiLoader Loader(hInstance);
  15. InitSystemRes(Loader.GetApp(), Loader.GetComMgr());
  16. InitUserRes(Loader.GetApp(), Loader.GetComMgr());
  17. new SNotifyCenter();
  18. nRet = Run<CLoginDlg>(Loader.GetApp());
  19. if (CApp::getSingletonPtr()->GetOut() == 1)
  20. {
  21. nRet = Run<CMainDlg>(Loader.GetApp());
  22. }
  23. delete CApp::getSingletonPtr();
  24. delete SNotifyCenter::getSingletonPtr();
  25. OleUninitialize();
  26. return nRet;
  27. }