Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > C++ > migration from ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 2 Topic 43664 of 48044
Post > Topic >>

migration from VC6 to VS2005

by AyeshaRabi@[EMAIL PROTECTED] Mar 4, 2008 at 10:27 AM

Hello,

We are currently migrating from VC6 compiler to VS2005 compiler. While
building a particular component the following compiler error is
encountered.

C:\Program Files\Microsoft Visual Studio 8\VC\ATLMFC\INCLUDE
\atlcom.h(3486) : error C2664:
'ATL::CComObjectCached<Base>::CreateInstance' : cannot convert
parameter 1 from 'ATL::CComObjectCached<Base> **' to
'ATL::CComObjectCached<Base> **'
1>        with
1>        [
1>            Base=ASS::CADS_Store
1>        ]
1>        and
1>        [
1>            Base=ASS::CADS_Store
1>        ]
1>        and
1>        [
1>            Base=tracing::Base
1>        ]
1>        Types pointed to are unrelated; conversion requires
reinterpret_cast, C-style cast or function-style cast
1>        C:\Program Files\Microsoft Visual Studio 8\VC\ATLMFC\INCLUDE
\atlcom.h(3466) : while compiling class template member function
'HRESULT
ATL::CComClassFactorySingleton<T>::CreateInstance(LPUNKNOWN,const IID
&,void **)'
1>        with
1>        [
1>            T=ASS::CADS_Store
1>        ]
1>        C:\Program Files\Microsoft Visual Studio 8\VC\ATLMFC\INCLUDE
\atlcom.h(2707) : see reference to class template instantiation
'ATL::CComClassFactorySingleton<T>' being compiled
1>        with
1>        [
1>            T=ASS::CADS_Store
1>        ]
1>        C:\Program Files\Microsoft Visual Studio 8\VC\ATLMFC\INCLUDE
\atlcom.h(1792) : see reference to class template instantiation
'ATL::CComObjectNoLock<Base>' being compiled
1>        with
1>        [
1>            Base=ATL::CComClassFactorySingleton<ASS::CADS_Store>
1>        ]
1>        C:\Program Files\Microsoft Visual Studio 8\VC\ATLMFC\INCLUDE
\atlcom.h(1781) : while compiling class template member function
'HRESULT ATL::CComCreator<T1>::CreateInstance(void *,const IID
&,LPVOID *)'
1>        with
1>        [
1>
T1=ATL::CComObjectNoLock<ATL::CComClassFactorySingleton<ASS::CADS_Store>>
1>        ]
1>        .\ASS.cpp(157) : see reference to class template
instantiation 'ATL::CComCreator<T1>' being compiled
1>        with
1>        [
1>
T1=ATL::CComObjectNoLock<ATL::CComClassFactorySingleton<ASS::CADS_Store>>
1>        ]

The error points to 'OBJECT_ENTRY(CLSID_ADS_Store, CADS_Store)' in our
code. CADS_Store class is defined as follows:
class ATL_NO_VTABLE CADS_Store :
		public CComObjectRootEx<CComMultiThreadModel>,
		public CComCoClass<CADS_Store, &CLSID_ADS_Store>,
		public IDispatchImpl<IADS_Store, &IID_IADS_Store, &LIBID_ASSLib>,
		public tracing::Base
	{...};

'tracing::Base' is a user defined class used for tracing. When this
class name is changed to 'tracing::TracingBase' for instance the
component builds without any compiler error.

Is usage of class-name 'Base' conflicting?
Kindly let me the reason for above behavior.

Thanks in advance.
Any help is highly appreciated.

Regards,
Ayesha.
 




 2 Posts in Topic:
migration from VC6 to VS2005
AyeshaRabi@[EMAIL PROTECT  2008-03-04 10:27:46 
Re: migration from VC6 to VS2005
"EventHelix.com"  2008-03-04 18:15:23 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Wed Oct 15 22:41:59 CDT 2008.