Quantcast
Channel: Visual C forum
Viewing all articles
Browse latest Browse all 15302

error C2664: '_com_ptr_t::_com_ptr_t(int)' : cannot convert parameter 1 from 'ATL::CComPtr' to 'int'

$
0
0

Hi,

I'm migrating a project from vs 6.0 to vs 2008, I get the following error, I am not able to fix this issue and I could not understand why this is throwing a bug in vs 2008 while the same is working fine in vs 6.0

Details on the error below:

Error Line from Code:

XML::IXMLDOMNodePtr spNode(*oIte);

Error:

error C2664: '_com_ptr_t<_IIID>::_com_ptr_t(int)' : cannot convert parameter 1 from 'ATL::CComPtr<T>' to 'int'

Output:

error C2664: '_com_ptr_t<_IIID>::_com_ptr_t(int)' : cannot convert parameter 1 from 'ATL::CComPtr<T>' to 'int' with [ _IIID=_com_IIID<XML::IXMLDOMNode,& _GUID_2933bf80_7b36_11d2_b20e_00c04f983e60> ] and [ T=XML::IXMLDOMNode ]

Definition of IXMLDOMNodePtr

_COM_SMARTPTR_TYPEDEF(IXMLDOMNode, __uuidof(IXMLDOMNode));

Definition of oIte

for ( iterator oIte(m_spXMLNode->childNodes); oIte != iterator(); ++oIte )

Definition of m_spXMLNode

XML::IXMLDOMNodePtr m_spXMLNode; 
Can anyone suggest me on how to rewrite oIte to fix this issue.

XML::IXMLDOMNodePtr spNode(*oIte);

Any help is greatly appreciated. Thanks a lot in advance.


Viewing all articles
Browse latest Browse all 15302


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>