Updator.cpp 1.0 KB

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