From: NickP on
Hi there,

I am currently recieving a compiler error in atlcom.h on the following
lines,

Error 10 error C2660: 'ATL::CComVariant::ReadFromStream' : function does not
take 2 arguments C:\Program Files\Microsoft Visual Studio
8\VC\atlmfc\include\atlcom.h 5969
Error 11 error C2660: 'ATL::CComVariant::WriteToStream' : function does not
take 2 arguments C:\Program Files\Microsoft Visual Studio
8\VC\atlmfc\include\atlcom.h 6056
Error 12 error C2039: 'ClearToZero' : is not a member of 'ATL::CComVariant'
C:\Program Files\Microsoft Visual Studio 8\VC\atlmfc\include\atlcom.h 6138

I can't for the life of me think what could be causing this all of a
sudden. Although I have recently installed VS 2005 Service Pack 1 and this
is the first time that I have attempted to compile this particular
application since.

Any ideas on how I can fix this? Are there 2 CComVariant objects?

Nick.



From: Igor Tandetnik on
"NickP" <a(a)a.com> wrote in message
news:uNTWhzKNHHA.1248(a)TK2MSFTNGP03.phx.gbl
> I am currently recieving a compiler error in atlcom.h on the
> following lines,
>
> Error 10 error C2660: 'ATL::CComVariant::ReadFromStream' : function
> does not take 2 arguments

Show the code that actually calls ReadFromStream. This method indeed
takes only one argument, and always has.

> Are there 2 CComVariant objects?

Not unless your own code defines the second one.
--
With best wishes,
Igor Tandetnik

With sufficient thrust, pigs fly just fine. However, this is not
necessarily a good idea. It is hard to be sure where they are going to
land, and it could be dangerous sitting under them as they fly
overhead. -- RFC 1925


From: NickP on
Hi Igor,

As i said, it's in atlcom.h

I haven't modifed any of the code in there...

>> hr = var.ReadFromStream(pStm, pMap[i].vt);

>> hr = var.WriteToStream(pStm, pMap[i].vt);

>> var.ClearToZero();

Those are the 3 offending lines of code. Many thanks for your time
and help.

Nick.

"Igor Tandetnik" <itandetnik(a)mvps.org> wrote in message
news:e49MSyLNHHA.5016(a)TK2MSFTNGP04.phx.gbl...
> "NickP" <a(a)a.com> wrote in message
> news:uNTWhzKNHHA.1248(a)TK2MSFTNGP03.phx.gbl
>> I am currently recieving a compiler error in atlcom.h on the
>> following lines,
>>
>> Error 10 error C2660: 'ATL::CComVariant::ReadFromStream' : function
>> does not take 2 arguments
>
> Show the code that actually calls ReadFromStream. This method indeed takes
> only one argument, and always has.
>
>> Are there 2 CComVariant objects?
>
> Not unless your own code defines the second one.
> --
> With best wishes,
> Igor Tandetnik
>
> With sufficient thrust, pigs fly just fine. However, this is not
> necessarily a good idea. It is hard to be sure where they are going to
> land, and it could be dangerous sitting under them as they fly
> overhead. -- RFC 1925
>


From: Igor Tandetnik on
"NickP" <a(a)a.com> wrote in message
news:uNTWhzKNHHA.1248(a)TK2MSFTNGP03.phx.gbl
> I am currently recieving a compiler error in atlcom.h on the
> following lines,
>
> Error 10 error C2660: 'ATL::CComVariant::ReadFromStream' : function
> does not take 2 arguments C:\Program Files\Microsoft Visual Studio
> 8\VC\atlmfc\include\atlcom.h 5969
> Error 11 error C2660: 'ATL::CComVariant::WriteToStream' : function
> does not take 2 arguments C:\Program Files\Microsoft Visual Studio
> 8\VC\atlmfc\include\atlcom.h 6056
> Error 12 error C2039: 'ClearToZero' : is not a member of
> 'ATL::CComVariant' C:\Program Files\Microsoft Visual Studio
> 8\VC\atlmfc\include\atlcom.h 6138


Turns out to be a known problem in VS2005 SP1:

http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=214357

Two workarounds are editing atlcom.h by hand, or uninstalling SP1.
--
With best wishes,
Igor Tandetnik

With sufficient thrust, pigs fly just fine. However, this is not
necessarily a good idea. It is hard to be sure where they are going to
land, and it could be dangerous sitting under them as they fly
overhead. -- RFC 1925


From: NickP on
Hi Igor,

Thankyou very much for your help, this is great. Very surprised it got
left into service pack 1 :-(

Nick.

"Igor Tandetnik" <itandetnik(a)mvps.org> wrote in message
news:eo9Kt9RNHHA.1280(a)TK2MSFTNGP04.phx.gbl...
> "NickP" <a(a)a.com> wrote in message
> news:uNTWhzKNHHA.1248(a)TK2MSFTNGP03.phx.gbl
>> I am currently recieving a compiler error in atlcom.h on the
>> following lines,
>>
>> Error 10 error C2660: 'ATL::CComVariant::ReadFromStream' : function
>> does not take 2 arguments C:\Program Files\Microsoft Visual Studio
>> 8\VC\atlmfc\include\atlcom.h 5969
>> Error 11 error C2660: 'ATL::CComVariant::WriteToStream' : function
>> does not take 2 arguments C:\Program Files\Microsoft Visual Studio
>> 8\VC\atlmfc\include\atlcom.h 6056
>> Error 12 error C2039: 'ClearToZero' : is not a member of
>> 'ATL::CComVariant' C:\Program Files\Microsoft Visual Studio
>> 8\VC\atlmfc\include\atlcom.h 6138
>
>
> Turns out to be a known problem in VS2005 SP1:
>
> http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=214357
>
> Two workarounds are editing atlcom.h by hand, or uninstalling SP1.
> --
> With best wishes,
> Igor Tandetnik
>
> With sufficient thrust, pigs fly just fine. However, this is not
> necessarily a good idea. It is hard to be sure where they are going to
> land, and it could be dangerous sitting under them as they fly
> overhead. -- RFC 1925
>