EgoDllTest.cpp 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. // Updator.cpp : main source file for Updator.exe
  2. //
  3. #include "stdafx.h"
  4. #include "resource.h"
  5. #include <string>
  6. #include "RenderWindow.h"
  7. #include "FishEyeWindow.h"
  8. #include "MainDlg.h"
  9. CAppModule _Module;
  10. int WINAPI _tWinMain(HINSTANCE hInstance, HINSTANCE /*hPrevInstance*/, LPTSTR /*lpstrCmdLine*/, int /*nCmdShow*/)
  11. {
  12. HRESULT hRes = ::CoInitialize(NULL);
  13. // If you are running on NT 4.0 or higher you can use the following call instead to
  14. // make the EXE free threaded. This means that calls come in on a random RPC thread.
  15. // HRESULT hRes = ::CoInitializeEx(NULL, COINIT_MULTITHREADED);
  16. ATLASSERT(SUCCEEDED(hRes));
  17. // this resolves ATL window thunking problem when Microsoft Layer for Unicode (MSLU) is used
  18. ::DefWindowProc(NULL, 0, 0, 0L);
  19. AtlInitCommonControls(ICC_BAR_CLASSES); // add flags to support other controls
  20. hRes = _Module.Init(NULL, hInstance);
  21. ATLASSERT(SUCCEEDED(hRes));
  22. int nRet = 0;
  23. // BLOCK: Run application
  24. {
  25. CMainDlg dlgMain;
  26. nRet = dlgMain.DoModal();
  27. }
  28. _Module.Term();
  29. ::CoUninitialize();
  30. return nRet;
  31. }