d***@gmail.com
2007-05-27 12:09:15 UTC
I have a problem importing a Microsoft Office type libraries into my
application. I am using Visual Studio 2005. I tried it with both
#import directive and wizard->AddClass->FromTypeLib. Nothing seems to
work. Lately I found this article: http://support.microsoft.com/kb/307473.
I'm doing exactly as they say, however I'm not able even to compile
the project. Because of a huge amount of errors I receive during
compilation, I think that there some kind of basic problem I can't
find.
Here are some of compilation errors I receive when I try to build
project from http://support.microsoft.com/kb/307473:
---------------------------------------------------------------------------�-----------------------------------------------
...\debug\excel.tlh(1219) : error C2371: 'FontPtr' : redefinition;
different basic types
c:\program files\microsoft visual studio 8\vc\include\comdef.h(312) :
see declaration of 'FontPtr'
...\debug\excel.tlh(1297) : error C2786: 'BOOL (__stdcall *)
(HDC,int,int,int,int)' : invalid operand for __uuidof
...\debug\excel.tlh(1297) : error C2923: '_com_IIID' : 'Rectangle' is
not a valid template type argument for parameter '_Interface'
c:\program files\microsoft visual studio 8\vc\platformsdk\include
\wingdi.h(3514) : see declaration of 'Rectangle'
...\debug\excel.tlh(1297) : error C3203: '_com_IIID' : unspecialized
class template can't be used as a template argument for template
parameter '_IIID', expected a real type
...\debug\excel.tlh(1301) : error C2786: 'BOOL (__stdcall *)
(HDC,int,int,int,int,int,int,int,int)' : invalid operand for __uuidof
...\debug\excel.tlh(1301) : error C2923: '_com_IIID' : 'Arc' is not a
valid template type argument for parameter '_Interface'
c:\program files\microsoft visual studio 8\vc\platformsdk\include
\wingdi.h(2765) : see declaration of 'Arc'
...\debug\excel.tlh(1301) : error C3203: '_com_IIID' : unspecialized
class template can't be used as a template argument for template
parameter '_IIID', expected a real type
...\debug\excel.tlh(1308) : error C2371: 'PicturePtr' : redefinition;
different basic types
c:\program files\microsoft visual studio 8\vc\include\comdef.h(326) :
see declaration of 'PicturePtr'
...\debug\excel.tlh(1689) : error C2504: '_IMsoDispObj' : base class
undefined
...\debug\excel.tlh(1731) : error C2504: '_IMsoDispObj' : base class
undefined
...\debug\excel.tlh(1852) : error C4430: missing type specifier - int
assumed. Note: C++ does not support default-int
...\debug\excel.tlh(1852) : error C4430: missing type specifier - int
assumed. Note: C++ does not support default-int
---------------------------------------------------------------------------�-----------------------------------------------
Please advice!
Thanks in advance,
Denis.
application. I am using Visual Studio 2005. I tried it with both
#import directive and wizard->AddClass->FromTypeLib. Nothing seems to
work. Lately I found this article: http://support.microsoft.com/kb/307473.
I'm doing exactly as they say, however I'm not able even to compile
the project. Because of a huge amount of errors I receive during
compilation, I think that there some kind of basic problem I can't
find.
Here are some of compilation errors I receive when I try to build
project from http://support.microsoft.com/kb/307473:
---------------------------------------------------------------------------�-----------------------------------------------
...\debug\excel.tlh(1219) : error C2371: 'FontPtr' : redefinition;
different basic types
c:\program files\microsoft visual studio 8\vc\include\comdef.h(312) :
see declaration of 'FontPtr'
...\debug\excel.tlh(1297) : error C2786: 'BOOL (__stdcall *)
(HDC,int,int,int,int)' : invalid operand for __uuidof
...\debug\excel.tlh(1297) : error C2923: '_com_IIID' : 'Rectangle' is
not a valid template type argument for parameter '_Interface'
c:\program files\microsoft visual studio 8\vc\platformsdk\include
\wingdi.h(3514) : see declaration of 'Rectangle'
...\debug\excel.tlh(1297) : error C3203: '_com_IIID' : unspecialized
class template can't be used as a template argument for template
parameter '_IIID', expected a real type
...\debug\excel.tlh(1301) : error C2786: 'BOOL (__stdcall *)
(HDC,int,int,int,int,int,int,int,int)' : invalid operand for __uuidof
...\debug\excel.tlh(1301) : error C2923: '_com_IIID' : 'Arc' is not a
valid template type argument for parameter '_Interface'
c:\program files\microsoft visual studio 8\vc\platformsdk\include
\wingdi.h(2765) : see declaration of 'Arc'
...\debug\excel.tlh(1301) : error C3203: '_com_IIID' : unspecialized
class template can't be used as a template argument for template
parameter '_IIID', expected a real type
...\debug\excel.tlh(1308) : error C2371: 'PicturePtr' : redefinition;
different basic types
c:\program files\microsoft visual studio 8\vc\include\comdef.h(326) :
see declaration of 'PicturePtr'
...\debug\excel.tlh(1689) : error C2504: '_IMsoDispObj' : base class
undefined
...\debug\excel.tlh(1731) : error C2504: '_IMsoDispObj' : base class
undefined
...\debug\excel.tlh(1852) : error C4430: missing type specifier - int
assumed. Note: C++ does not support default-int
...\debug\excel.tlh(1852) : error C4430: missing type specifier - int
assumed. Note: C++ does not support default-int
---------------------------------------------------------------------------�-----------------------------------------------
Please advice!
Thanks in advance,
Denis.