• Main Page
  • Related Pages
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

E:/PROJECTS/cvsed/mixed/VIRTUA~1/vmmon/vmmon.cpp

Go to the documentation of this file.
00001 
00007 #include "stdafx.h"
00008 
00009 #include "resource.h"
00010 
00011 #include "MainDlg.h"
00012 
00013 CAppModule _Module;
00014 
00015 int WINAPI _tWinMain(HINSTANCE hInstance, HINSTANCE /*hPrevInstance*/, LPTSTR /*lpstrCmdLine*/, int /*nCmdShow*/)
00016 {
00017         //HRESULT hRes = ::CoInitialize(NULL);
00018 // If you are running on NT 4.0 or higher you can use the following call instead to 
00019 // make the EXE free threaded. This means that calls come in on a random RPC thread.
00020         HRESULT hRes = ::CoInitializeEx(NULL, COINIT_MULTITHREADED);
00021         ATLASSERT(SUCCEEDED(hRes));
00022 
00023         // this resolves ATL window thunking problem when Microsoft Layer for Unicode (MSLU) is used
00024         ::DefWindowProc(NULL, 0, 0, 0L);
00025 
00026         AtlInitCommonControls(ICC_BAR_CLASSES); // add flags to support other controls
00027 
00028         hRes = _Module.Init(NULL, hInstance);
00029         ATLASSERT(SUCCEEDED(hRes));
00030 
00031         int nRet = 0;
00032         // BLOCK: Run application
00033         {
00034                 CMainDlg dlgMain;
00035                 nRet = (int)dlgMain.DoModal();
00036         }
00037 
00038         _Module.Term();
00039         ::CoUninitialize();
00040 
00041         return nRet;
00042 }