I am migrating my C++ ATL Executable application from VS2003 to VS2013.
In VS 2003
class CExeModule : public CComModule
In VS2013 (its been changed to)
class CExeModule : public ATL::CAtlExeModuleT< CExeModule >
I have successfully migrated the project, during compilation i am facing a issue
**
error C2664: 'ATL::CHandle::CHandle(HANDLE) throw()' : cannot convert argument 1 from 'bool' to 'ATL::CHandle &'
**
I don't get this error if i comment the following code
_AtlModule.WinMain(nShowCmd);
Can someone help here to solve this error ?
Additional info
C:\Program Files\Microsoft Visual Studio 12.0\VC\atlmfc\include\atlbase.h(3628): error C2664: 'ATL::CHandle::CHandle(HANDLE) throw()' : cannot convert argument 1 from 'bool' to 'ATL::CHandle &' C:\Program Files\Microsoft Visual Studio 12.0\VC\atlmfc\include\atlbase.h(3608) : while compiling class template member function 'HRESULT ATL::CAtlExeModuleT::PreMessageLoop(int) throw()' C:\Program Files\Microsoft Visual Studio 12.0\VC\atlmfc\include\atlbase.h(3695) : see reference to function template instantiation 'HRESULT ATL::CAtlExeModuleT::PreMessageLoop(int) throw()' being compiled
stdafx.h(107) : see reference to class template instantiation 'ATL::CAtlExeModuleT' being compiled
CExeModule::PreMessageLoop
which you don't show. – Roman R.CHandle h(pT->StartMonitor());
DoesCExeModule
have a methodStartMonitor
returningbool
, by any chance? Another possibility - do you maybe have a macro or a typedef redefiningHANDLE
somewhere in your program? Also check preprocessor definitions in project properties. – Igor Tandetnik