|
Hi,
We have created a dialog based application in vc 8 for excel automation (Excel 2003). When we are using the wrapper class, we are getting the following errors.
------ Build started: Project: AutoProject2, Configuration: Debug Win32 ------
Compiling...
AutoProject2.cpp
AutoProject2Dlg.cpp
f:\sangeetha\autoproject2\autoproject2\debug\excel.tlh(1219) : error C2371: 'FontPtr' : redefinition; different basic types
e:\program files\microsoft visual studio 8\vc\include\comdef.h(312) : see declaration of 'FontPtr'
f:\sangeetha\autoproject2\autoproject2\debug\excel.tlh(1297) : error C2786: 'BOOL (__stdcall *)(HDC,int,int,int,int)' : invalid operand for __uuidof
f:\sangeetha\autoproject2\autoproject2\debug\excel.tlh(1297) : error C2923: '_com_IIID' : 'Rectangle' is not a valid template type argument for parameter '_Interface'
e:\program files\microsoft visual studio 8\vc\platformsdk\include\wingdi.h(3514) : see declaration of 'Rectangle'
f:\sangeetha\autoproject2\autoproject2\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
f:\sangeetha\autoproject2\autoproject2\debug\excel.tlh(1301) : error C2786: 'BOOL (__stdcall *)(HDC,int,int,int,int,int,int,int,int)' : invalid operand for __uuidof
f:\sangeetha\autoproject2\autoproject2\debug\excel.tlh(1301) : error C2923: '_com_IIID' : 'Arc' is not a valid template type argument for parameter '_Interface'
e:\program files\microsoft visual studio 8\vc\platformsdk\include\wingdi.h(2765) : see declaration of 'Arc'
f:\sangeetha\autoproject2\autoproject2\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
f:\sangeetha\autoproject2\autoproject2\debug\excel.tlh(1308) : error C2371: 'PicturePtr' : redefinition; different basic types
e:\program files\microsoft visual studio 8\vc\include\comdef.h(326) : see declaration of 'PicturePtr'
f:\sangeetha\autoproject2\autoproject2\debug\excel.tlh(1689) : error C2504: '_IMsoDispObj' : base class undefined
f:\sangeetha\autoproject2\autoproject2\debug\excel.tlh(1731) : error C2504: '_IMsoDispObj' : base class undefined
f:\sangeetha\autoproject2\autoproject2\debug\excel.tlh(1833) : error C2504: '_IMsoDispObj' : base class undefined
f:\sangeetha\autoproject2\autoproject2\debug\excel.tlh(1852) : error C2146: syntax error : missing ';' before identifier 'GetRGB'
f:\sangeetha\autoproject2\autoproject2\debug\excel.tlh(1852) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
f:\sangeetha\autoproject2\autoproject2\debug\excel.tlh(1852) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
f:\sangeetha\autoproject2\autoproject2\debug\excel.tlh(1852) : warning C4183: 'GetRGB': missing return type; assumed to be a member function returning 'int'
f:\sangeetha\autoproject2\autoproject2\debug\excel.tlh(1854) : error C2061: syntax error : identifier 'MsoRGBType'
f:\sangeetha\autoproject2\autoproject2\debug\excel.tlh(2189) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
f:\sangeetha\autoproject2\autoproject2\debug\excel.tlh(2189) : warning C4183: 'GetTransparencyColor': missing return type; assumed to be a member function returning 'int'
f:\sangeetha\autoproject2\autoproject2\debug\excel.tlh(2191) : error C2061: syntax error : identifier 'MsoRGBType'
f:\sangeetha\autoproject2\autoproject2\debug\excel.tlh(2235) : error C2061: syntax error : identifier 'MsoRGBType'
f:\sangeetha\autoproject2\autoproject2\debug\excel.tlh(2237) : error C2061: syntax error : identifier 'MsoRGBType'
f:\sangeetha\autoproject2\autoproject2\debug\excel.tlh(2246) : error C2504: '_IMsoDispObj' : base class undefined
f:\sangeetha\autoproject2\autoproject2\debug\excel.tlh(2335) : error C2504: '_IMsoDispObj' : base class undefined
f:\sangeetha\autoproject2\autoproject2\debug\excel.tlh(2453) : error C2504: '_IMsoDispObj' : base class undefined
f:\sangeetha\autoproject2\autoproject2\debug\excel.tlh(2579) : error C2504: '_IMsoDispObj' : base class undefined
f:\sangeetha\autoproject2\autoproject2\debug\excel.tlh(5491) : error C2011: 'Font' : 'struct' type redefinition
e:\program files\microsoft visual studio 8\vc\include\comdef.h(310) : see declaration of 'Font'
f:\sangeetha\autoproject2\autoproject2\debug\excel.tlh(7783) : warning C4003: not enough actual parameters for macro 'DialogBoxW'
f:\sangeetha\autoproject2\autoproject2\debug\excel.tlh(7783) : error C2059: syntax error : ','
f:\sangeetha\autoproject2\autoproject2\debug\excel.tlh(17141) : error C2011: 'Picture' : 'struct' type redefinition
e:\program files\microsoft visual studio 8\vc\include\comdef.h(324) : see declaration of 'Picture'
f:\sangeetha\autoproject2\autoproject2\debug\excel.tlh(18104) : error C2146: syntax error : missing ';' before identifier 'Scripts'
f:\sangeetha\autoproject2\autoproject2\debug\excel.tlh(18104) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
f:\sangeetha\autoproject2\autoproject2\debug\excel.tlh(26976) : error C2059: syntax error : '('
f:\sangeetha\autoproject2\autoproject2\debug\excel.tlh(26976) : error C2059: syntax error : ')'
f:\sangeetha\autoproject2\autoproject2\debug\excel.tlh(26976) : error C2143: syntax error : missing ')' before '|'
f:\sangeetha\autoproject2\autoproject2\debug\excel.tlh(26976) : error C2143: syntax error : missing ')' before '|'
f:\sangeetha\autoproject2\autoproject2\debug\excel.tlh(26976) : error C2143: syntax error : missing ';' before '|'
f:\sangeetha\autoproject2\autoproject2\debug\excel.tlh(26976) : error C2059: syntax error : ')'
f:\sangeetha\autoproject2\autoproject2\debug\excel.tlh(26976) : error C2059: syntax error : ')'
f:\sangeetha\autoproject2\autoproject2\debug\excel.tlh(26976) : error C2238: unexpected token(s) preceding ';'
f:\sangeetha\autoproject2\autoproject2\debug\excel.tlh(30578) : error C2146: syntax error : missing ';' before identifier 'MailEnvelope'
f:\sangeetha\autoproject2\autoproject2\debug\excel.tlh(30578) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
f:\sangeetha\autoproject2\autoproject2\debug\excel.tlh(30578) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
f:\sangeetha\autoproject2\autoproject2\debug\excel.tlh(30598) : error C2146: syntax error : missing ';' before identifier 'Scripts'
f:\sangeetha\autoproject2\autoproject2\debug\excel.tlh(30598) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
f:\sangeetha\autoproject2\autoproject2\debug\excel.tlh(30598) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
f:\sangeetha\autoproject2\autoproject2\debug\excel.tlh(30980) : error C2146: syntax error : missing ';' before identifier 'GetScripts'
f:\sangeetha\autoproject2\autoproject2\debug\excel.tlh(30980) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
f:\sangeetha\autoproject2\autoproject2\debug\excel.tlh(30980) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
f:\sangeetha\autoproject2\autoproject2\debug\excel.tlh(30980) : warning C4183: 'GetScripts': missing return type; assumed to be a member function returning 'int'
f:\sangeetha\autoproject2\autoproject2\debug\excel.tlh(31000) : error C2146: syntax error : missing ';' before identifier 'GetMailEnvelope'
f:\sangeetha\autoproject2\autoproject2\debug\excel.tlh(62897) : warning C4183: 'GetMailEnvelope': missing return type; assumed to be a member function returning 'int'
f:\sangeetha\autoproject2\autoproject2\debug\excel.tlh(63522) : error C2146: syntax error : missing ';' before identifier 'HTMLProject'
f:\sangeetha\autoproject2\autoproject2\debug\excel.tlh(63522) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
f:\sangeetha\autoproject2\autoproject2\debug\excel.tlh(63522) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
f:\sangeetha\autoproject2\autoproject2\debug\excel.tlh(63532) : error C2146: syntax error : missing ';' before identifier 'CommandBars'
f:\sangeetha\autoproject2\autoproject2\debug\excel.tlh(63532) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
f:\sangeetha\autoproject2\autoproject2\debug\excel.tlh(63532) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
f:\sangeetha\autoproject2\autoproject2\debug\excel.tlh(63576) : error C2146: syntax error : missing ';' before identifier 'VBProject'
f:\sangeetha\autoproject2\autoproject2\debug\excel.tlh(63576) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
f:\sangeetha\autoproject2\autoproject2\debug\excel.tlh(63576) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
f:\sangeetha\autoproject2\autoproject2\debug\excel.tlh(63578) : error C2146: syntax error : missing ';' before identifier 'Permission'
f:\sangeetha\autoproject2\autoproject2\debug\excel.tlh(63578) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
f:\sangeetha\autoproject2\autoproject2\debug\excel.tlh(63578) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
f:\sangeetha\autoproject2\autoproject2\debug\excel.tlh(63580) : error C2146: syntax error : missing ';' before identifier 'SharedWorkspace'
f:\sangeetha\autoproject2\autoproject2\debug\excel.tlh(64067) : error C2146: syntax error : missing ';' before identifier 'GetHTMLProject'
f:\sangeetha\autoproject2\autoproject2\debug\excel.tlh(64067) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
f:\sangeetha\autoproject2\autoproject2\debug\excel.tlh(64148) : warning C4183: 'GetSync': missing return type; assumed to be a member function returning 'int'
f:\sangeetha\autoproject2\autoproject2\debug\excel.tlh(64160) : error C2146: syntax error : missing ';' before identifier 'GetSmartDocument'
f:\sangeetha\autoproject2\autoproject2\debug\excel.tlh(64160) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
f:\sangeetha\autoproject2\autoproject2\debug\excel.tlh(64160) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
f:\sangeetha\autoproject2\autoproject2\debug\excel.tlh(64160) : warning C4183: 'GetSmartDocument': missing return type; assumed to be a member function returning 'int'
f:\sangeetha\autoproject2\autoproject2\debug\excel.tlh(64161) : error C2146: syntax error : missing ';' before identifier 'GetDocumentLibraryVersions'
f:\sangeetha\autoproject2\autoproject2\debug\excel.tlh(64161) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
f:\sangeetha\autoproject2\autoproject2\debug\excel.tlh(64161) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
f:\sangeetha\autoproject2\autoproject2\debug\excel.tlh(64161) : warning C4183: 'GetDocumentLibraryVersions': missing return type; assumed to be a member function returning 'int'
f:\sangeetha\autoproject2\autoproject2\debug\excel.tlh(68608) : error C2146: syntax error : missing ';' before identifier 'GetNewWorkbook'
f:\sangeetha\autoproject2\autoproject2\debug\excel.tlh(68608) : fatal error C1003: error count exceeds 100; stopping compilation
Generating Code...
Build log was saved at "file://f:\Sangeetha\AutoProject2\AutoProject2\Debug\BuildLog.htm"
AutoProject2 - 222 error(s), 34 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========<base href="http://mail.tessolve.com/cgi-bin/webmail/">
How to correct these errors?
Thanks in advance,
Sangeetha. J
With Regards,
Sangeetha.
|
|
|
|
|
25, M, Ind.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
How to do excel automation using vc++ 8?
With Regards,
Sangeetha.
|
|
|
|
|
Sangeetha_J wrote: f:\sangeetha\autoproject2\autoproject2\debug\excel.tlh(1219) : error C2371: 'FontPtr' : redefinition; different basic types
See here.
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hi David,
Am getting about 231 errors when trying to create an wrapper class for MS Excel 2003 using visual studio 2005. My requirement is to create an application that reads an excel file using visual studio 2005. In our system, MSOffice 2003 is installed. Our application should be capable of supporting versions other than MS office 2003 also. Please give me any suggestions.
With Regards,
Sangeetha.
|
|
|
|
|
Maybe try to replace
#import "C:\\Program Files\\Microsoft Office\\Office12\\EXCEL.EXE" no_namespace
by
#import "C:\\Program Files\\Common Files\\Microsoft Shared\\Office12\\MSO.DLL" \
rename( "RGB", "MSORGB" )
using namespace Office;
#import "C:\\Program Files\\Common Files\\Microsoft Shared\\VBA\\VBA6\\VBE6EXT.OLB"
using namespace VBIDE;
#import "C:\\Program Files\\Microsoft Office\\Office12\\EXCEL.EXE" \
rename( "DialogBox", "ExcelDialogBox" ) \
rename( "RGB", "ExcelRGB" ) \
rename( "CopyFile", "ExcelCopyFile" ) \
rename( "ReplaceText", "ExcelReplaceText" )
It's work for me
|
|
|
|
|
Hi all,
I have made a simple dialog box application, in that i have made a list control. In that list control items are being displayed one by one. My problem is as the number of items increases my list control shows a horizontal scroll bar. But i want that instead of horizontal scroll bar a vertical scroll bar should be displayed.
How to do it...
Thanks in advance
|
|
|
|
|
I'm assuming this is a List View control.
Have you tried setting the LVS_ALIGNLEFT style, instead of the LVS_ALIGNTOP style? Just a guess, but not a bad one.
Or try using LVM_SETITEMPOSITION and position the items yourself. You'd need to do this after adding each one, and do it for all when the control's size changes.
Iain.
Iain Clarke appears because CPallini still cares.
|
|
|
|
|
What do you need exactly,can you be more specific.
|
|
|
|
|
Hello All,
I am developing one application for internet usage monitoring(User open which site)
Now i need help to start where?
Thanks in advance
Manish Patel.
B.E. - Information Technology.
|
|
|
|
|
Errr don't know. Some suggestions:
1) Open up your favorite IDE and start writing some code.
2) Read the posting guidelines.
3) Read a C++ book.
4) ...
|
|
|
|
|
Thanks for your reply,
I know how to start IDE and all that stuff.
I want to know the starting point for Internet Usage Traking.
Any idea?
Thanks
Manish Patel.
B.E. - Information Technology.
|
|
|
|
|
And what do you mean exactly by "Internet Usage Traking". Maybe if you would explain a bit more in detail what you are looking for we could help...
|
|
|
|
|
I want to track web browsing.
Meanse whenever user open new web site in web browber then my programe should get notice about it.
Manish Patel.
B.E. - Information Technology.
|
|
|
|
|
manish.patel wrote: Meanse whenever user open new web site in web browber then my programe should get notice about it.
Perhaps you are wanting a BHO.
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Thanks for your great help.
Its useful for Internet Explorer.
Is there any alternative for Firefox and other web browsers?
Thanks
Manish Patel.
B.E. - Information Technology.
|
|
|
|
|
IPAudit[^] can do more than what you want. It is open source, does the job and does it well.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
Hi All,
I am preparing for an COM interview.
Can i know the difference between BSTR and VARIANT data types used in
COM ?
Difference between COM and DCOM ?
Any FAQ's on basics of COM ?
Regards
Suhi
|
|
|
|
|
|
suhi wrote: Can i know the difference between BSTR and VARIANT data types used in
COM ?
A VARIANT can contain data of many different types, such as long and IDispatch*. When a VARIANT contains a string, it is stored as a BSTR
A BSTR variable in C++ is actually a pointer to the first character of the string. In fact, the type BSTR is defined this way:
typedef OLECHAR* BSTR;
suhi wrote: Difference between COM and DCOM ?
DCOM allows you to communicate between different COM components located on different machines in a network.
suhi wrote: Any FAQ's on basics of COM ?
Read a good book "inside COM" is one of them.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
_AnShUmAn_ wrote: A BSTR variable in C++ is actually a pointer to the first character of the string. In fact, the type BSTR is defined this way:
typedef OLECHAR* BSTR;
While true there's more to it than that:
- The size of the BSTR is stored before the pointer!
- A specific allocator is assumed.
Steve
|
|
|
|
|
I am having a structure which is having CArray of another structure inside it.
While debuggin I can see only the first item CArray in debugger.
How to see the other items of CArray?
Thanks,
Suman
--
"Programming is an art that fights back!"
|
|
|
|
|
rp_suman wrote: While debuggin I can see only the first item CArray in debugger.
How to see the other items of CArray?
Here is an e.g.
CArray<int,int> IntArray;
AfxDump( &IntArray );
(IntArray).m_pData,20
If possible use vector!
Nibu thomas
Microsoft MVP for VC++
Code must be written to be read, not by the compiler, but by another human being.
Programming Blog: http://nibuthomas.wordpress.com
|
|
|
|
|
Hi,
Thanks for the help and idea given me!!
Thanks,
Suman
--
"Programming is an art that fights back!"
|
|
|
|
|
Let's say your array is m_MyArray. To see more than one item, you can type
m_MyArray,5 in the watch window - that shows 5 items.
Hope that helps.
Karl - WK5M
PP-ASEL-IA (N43CS)
PGP Key: 0xDB02E193
PGP Key Fingerprint: 8F06 5A2E 2735 892B 821C 871A 0411 94EA DB02 E193
|
|
|
|