Hi All,
I'm migrating VS2008(VC++) code to VS2013. I'm not able to save any changes to this file, I get access denied message. Is it because this "atlcom.h" file is SDK's file, its not allowing me to make any changes?. Then how to fix this error. Please find below the output and error line below. Thanks a lot for any help!!
Output: C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\atlmfc\include\atlcom.h(5818): error C2664: 'HRESULT _CopyItfFromAdaptItf<IZipFileEntry>::copy(T **,ATL::CAdapt<ATL::CComPtr<T>> *)' : cannot convert argument 2 from 'const ATL::CAdapt<ATL::CComPtr<IZipFileEntry>> *' to 'ATL::CAdapt<ATL::CComPtr<IZipFileEntry>> *' 2> with 2> [ 2> T=IZipFileEntry 2> ] 2> Conversion loses qualifiers 2> C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\atlmfc\include\atlcom.h(5803) : while compiling class template member function 'HRESULT ATL::ICollectionOnSTLImpl<IZipFileDir1,EntryList,IZipFileEntry *,_CopyItfFromAdaptItf<IZipFileEntry>,EntryEnum>::get_Item(long,ItemType *)' 2> with 2> [ 2> ItemType=IZipFileEntry * 2> ] 2> C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\atlmfc\include\atlcom.h(5140) : see reference to class template instantiation 'ATL::ICollectionOnSTLImpl<IZipFileDir1,EntryList,IZipFileEntry *,_CopyItfFromAdaptItf<IZipFileEntry>,EntryEnum>' being compiled
Error Code: if (iter != m_coll.end()) hr = CopyItem::copy(pvar, &*iter); // Error C2664 return hr;
Actually, Before this error I got an error message stating "atlimpl.cpp" is not found/could not be opened. As per the recommendation in the below link, http://social.msdn.microsoft.com/Forums/en-US/4117ea1a-23a9-4b57-a753-547f9fc1087b/statregcpp-atlimplcpp-is-obsolete?forum=vcgeneral , I commented the #include<atlimpl.cpp> line, then on building the project again only, I get this error. Is it incorrect to have commeted #include<atlimpl.cpp> ?
Also, Please not that "atlimpl.cpp" which is part of sdk file in VS 2008, is no longer present in vs 2013
Regards,
JiJo