From: Carol on
When I upgrade an exe project from VC7.1 to VC8, it says upgrade
succeed.

But When I try to compile the project, it outputs a lot of errors.

c:\dev\main\shared\impress\debugu\msado15.tlh(1024) : error C2327:
'CDO::_ADO::Properties' : is not a type name, static, or enumerator
c:\dev\main\shared\impress\debugu\msado15.tlh(2086) : error C2327:
'CDO::Command15::Parameters' : is not a type name, static, or
enumerator
c:\dev\main\shared\impress\debugu\msado15.tlh(2285) : error C2327:
'CDO::Connection15::Errors' : is not a type name, static, or enumerator
c:\dev\main\shared\impress\debugu\msado15.tlh(2525) : error C2327:
'CDO::Recordset15::Fields' : is not a type name, static, or enumerator
c:\dev\main\shared\impress\debugu\msado15.tlh(3124) : error C2327:
'CDO::_Record::Fields' : is not a type name, static, or enumerator
c:\dev\main\shared\impress\debugu\msado15.tli(109) : error C2065:
'_result' : undeclared identifier
c:\dev\main\shared\impress\debugu\cdosys.tlh(628) : error C2327:
'CDO::IConfiguration::Fields' : is not a type name, static, or
enumerator
c:\dev\main\shared\impress\debugu\cdosys.tlh(814) : error C2327:
'CDO::IBodyPart::Fields' : is not a type name, static, or enumerator
c:\dev\main\shared\impress\debugu\cdosys.tlh(1090) : error C2327:
'CDO::IMessage::Fields' : is not a type name, static, or enumerator
c:\dev\main\shared\impress\debugu\cdosys.tlh(1100) : error C2327:
'CDO::IMessage::Fields' : is not a type name, static, or enumerator
c:\dev\main\shared\impress\processorthread.cpp(637) : error C3867:
'_com_error::Error': function call missing argument list; use
'&_com_error::Error' to create a pointer to member
c:\dev\main\shared\impress\processorthread.cpp(637) : error C3867:
'_com_error::Description': function call missing argument list; use
'&_com_error::Description' to create a pointer to member

in my project, the import sentenses are written like follows:
#include "stdafx.h"
#include "Resource.h"
#include "ProcessorThread.h"
#include <string>
#import "c:\program files\common files\system\ado\msado15.dll"
rename("ADODB","CDO") rename( "EOF", "adoEOF" )
#import <cdosys.dll>


I have read some thread related with this issue, but the difference is
I don't include the "msado15.h" in my project, so the other guy's
solution is not applicable for me.

Could anyone give a little hint?

From: Carol on
I fixed the issue :)

Root Reason:
The msado15.tlh and cdosys.tlh are not generated correctly. When I
compare the .tlh file generated by 2003 and 2005, I noticed the keyword

"struct" is missed in some method definitions in the tlh file
generated by 2005.
For example: in msado15.tlh
virtual HRESULT __stdcall get_Item (
/*[in]*/ VARIANT Index,
/*[out,retval]*/ struct Property * * ppvObject ) = 0; // this
struct is missed in the tlh generated under VS2005


virtual HRESULT __stdcall get_Item (
/*[in]*/ VARIANT Index,
/*[out,retval]*/ struct Error * * ppvObject ) = 0; // this
struct is missed in the tlh generated under VS2005


The generation of tlh files is affected by some codes in this project,
which is compiled earlier than the import sentences.


Solution:
Move the import sentences to the very beginning of stdafx.h. Maybe move

to other positions could also make things work. The only thing I did is

to make the import sentences compiled earlier than other sentences, by
moving their position.


http://blog.csdn.net/carolbaby/archive/2006/12/22/1452489.aspx

Carol wrote:
> When I upgrade an exe project from VC7.1 to VC8, it says upgrade
> succeed.
>
> But When I try to compile the project, it outputs a lot of errors.
>
> c:\dev\main\shared\impress\debugu\msado15.tlh(1024) : error C2327:
> 'CDO::_ADO::Properties' : is not a type name, static, or enumerator
> c:\dev\main\shared\impress\debugu\msado15.tlh(2086) : error C2327:
> 'CDO::Command15::Parameters' : is not a type name, static, or
> enumerator
> c:\dev\main\shared\impress\debugu\msado15.tlh(2285) : error C2327:
> 'CDO::Connection15::Errors' : is not a type name, static, or enumerator
> c:\dev\main\shared\impress\debugu\msado15.tlh(2525) : error C2327:
> 'CDO::Recordset15::Fields' : is not a type name, static, or enumerator
> c:\dev\main\shared\impress\debugu\msado15.tlh(3124) : error C2327:
> 'CDO::_Record::Fields' : is not a type name, static, or enumerator
> c:\dev\main\shared\impress\debugu\msado15.tli(109) : error C2065:
> '_result' : undeclared identifier
> c:\dev\main\shared\impress\debugu\cdosys.tlh(628) : error C2327:
> 'CDO::IConfiguration::Fields' : is not a type name, static, or
> enumerator
> c:\dev\main\shared\impress\debugu\cdosys.tlh(814) : error C2327:
> 'CDO::IBodyPart::Fields' : is not a type name, static, or enumerator
> c:\dev\main\shared\impress\debugu\cdosys.tlh(1090) : error C2327:
> 'CDO::IMessage::Fields' : is not a type name, static, or enumerator
> c:\dev\main\shared\impress\debugu\cdosys.tlh(1100) : error C2327:
> 'CDO::IMessage::Fields' : is not a type name, static, or enumerator
> c:\dev\main\shared\impress\processorthread.cpp(637) : error C3867:
> '_com_error::Error': function call missing argument list; use
> '&_com_error::Error' to create a pointer to member
> c:\dev\main\shared\impress\processorthread.cpp(637) : error C3867:
> '_com_error::Description': function call missing argument list; use
> '&_com_error::Description' to create a pointer to member
>
> in my project, the import sentenses are written like follows:
> #include "stdafx.h"
> #include "Resource.h"
> #include "ProcessorThread.h"
> #include <string>
> #import "c:\program files\common files\system\ado\msado15.dll"
> rename("ADODB","CDO") rename( "EOF", "adoEOF" )
> #import <cdosys.dll>
>
>
> I have read some thread related with this issue, but the difference is
> I don't include the "msado15.h" in my project, so the other guy's
> solution is not applicable for me.
>
> Could anyone give a little hint?