472,989 Members | 3,095 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,989 software developers and data experts.

VS 2005 atlbase.h Compilation Error

Hi,

I have a VS 6 project and I am trying to compile it using VS 2005.
My program has the atlbase.h include which seems to trigger the errors.
It used to compile OK using VS 6.

The include path is:
C:/Program Files/Microsoft Visual Studio 8/VC/include;C:/Program Files/Microsoft Visual Studio 8/VC/atlmfc/include;C:/Program Files/Microsof
t Visual Studio 8/SDK/v2.0/include;C:/Program Files/Microsoft Visual Studio 8/VC/PlatformSDK/include; ... and other stuff

Here are the error messages:

c:\program files\microsoft visual studio 8\vc\atlmfc\include\statreg.h(1106) : error C2664: 'ATL::Checked::tcsncpy_s' : cannot convert param
eter 2 from 'TCHAR [32]' to 'size_t'
There is no context in which this conversion is possible
c:\program files\microsoft visual studio 8\vc\atlmfc\include\statreg.h(1370) : error C2664: 'ATL::Checked::tcsncpy_s' : cannot convert param
eter 2 from 'TCHAR [260]' to 'size_t'
There is no context in which this conversion is possible
c:\program files\microsoft visual studio 8\vc\atlmfc\include\atlbase.h(5891) : error C2664: 'void ATL::CAtlModule::EscapeSingleQuote(LPOLEST
R,size_t,LPCOLESTR) throw()' : cannot convert parameter 2 from 'OLECHAR [520]' to 'size_t'
There is no context in which this conversion is possible
c:\program files\microsoft visual studio 8\vc\atlmfc\include\atlbase.h(5974) : error C2664: 'void ATL::CAtlModule::EscapeSingleQuote(LPOLEST
R,size_t,LPCOLESTR) throw()' : cannot convert parameter 2 from 'OLECHAR [520]' to 'size_t'
There is no context in which this conversion is possible
c:\program files\microsoft visual studio 8\vc\atlmfc\include\atlbase.h(6433) : error C2664: 'ATL::Checked::strcpy_s' : cannot convert parame
ter 2 from 'TCHAR *' to 'size_t'
There is no context in which this conversion is possible
c:\program files\microsoft visual studio 8\vc\atlmfc\include\atlbase.h(6452) : error C2664: 'ATL::Checked::strcpy_s' : cannot convert parame
ter 2 from 'TCHAR *' to 'size_t'
There is no context in which this conversion is possible
c:\program files\microsoft visual studio 8\vc\atlmfc\include\atlbase.h(6674) : error C2664: 'ATL::Checked::strcpy_s' : cannot convert parame
ter 2 from 'TCHAR [128]' to 'size_t'
There is no context in which this conversion is possible
c:\program files\microsoft visual studio 8\vc\atlmfc\include\atlbase.h(6675) : error C2664: 'ATL::Checked::strcat_s' : cannot convert parame
ter 2 from 'TCHAR [128]' to 'size_t'
There is no context in which this conversion is possible
c:\program files\microsoft visual studio 8\vc\atlmfc\include\atlbase.h(6676) : error C2664: 'ATL::Checked::strcat_s' : cannot convert parame
ter 2 from 'TCHAR [128]' to 'size_t'
There is no context in which this conversion is possible
c:\program files\microsoft visual studio 8\vc\atlmfc\include\atlbase.h(6699) : error C2664: 'ATL::Checked::strcpy_s' : cannot convert parame
ter 2 from 'TCHAR [128]' to 'size_t'
There is no context in which this conversion is possible
c:\program files\microsoft visual studio 8\vc\atlmfc\include\atlbase.h(6700) : error C2664: 'ATL::Checked::strcat_s' : cannot convert parame
ter 2 from 'TCHAR [128]' to 'size_t'
There is no context in which this conversion is possible
c:\program files\microsoft visual studio 8\vc\atlmfc\include\atlbase.h(6701) : error C2664: 'ATL::Checked::strcat_s' : cannot convert parame
ter 2 from 'TCHAR [128]' to 'size_t'
There is no context in which this conversion is possible
make: *** [win32/Debug/ProParser.o] Error 2

Thanks for any hep.

Misu
Nov 27 '07 #1
1 5078
weaknessforcats
9,208 Expert Mod 8TB
c:\program files\microsoft visual studio 8\vc\atlmfc\include\statreg.h(1106) : error C2664: 'ATL::Checked::tcsncpy_s' : cannot convert param
eter 2 from 'TCHAR [32]' to 'size_t'
For openers, tcsncpy_s has a second argument that is a size_t for the number of elements to copy. You are apprarently using the address of a TCHAR array in that position.

Check the function prototypes the functions in MSDN.

You need to fix the code.
Nov 28 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

10
by: RedEagle | last post by:
Hi All! Do you remember me? I am that desperate who had this error for a while: --- Compilation Error Description: An error occurred during the compilation of a resource required to service...
0
by: Mythran | last post by:
Web Project - No Strong Name BLL Project - Strong Name DAL Project - Strong Name Schema Project - Strong Name Web Control Assemblies - all have strong name None of the above is stored in the...
3
by: M Noreen | last post by:
I'm unable to build a web project that has a custom .NET control that I downloaded (from: http://blogs.msdn.com/dmitryr/archive/2006/03/26/561200.aspx) I'm running VS 2005, ASP.NET 2.0 on my...
2
by: MK | last post by:
Hi, I am having problem while adding user control into a user control in 2005 WAP project. The controls are in the same project. When I try to drag and drop the user control into and user...
1
by: Omatase | last post by:
Here is my code: CDO.Message iMessage = new CDO.MessageClass(); string sFrom; string sDate; iMessage.DataSource.Open(bstrURLItem,null, ADODB.ConnectModeEnum.adModeRead,...
9
by: subramanian | last post by:
Hello. Consider the following code fragment : enum TestEnum { val1 = 10, val2 = 100, val3 = 1000 }; class Test { public : enum TestEnum { val1 = 1, val2 val3 }; Test(int i = 0, int j = 0,...
2
by: subramanian | last post by:
Consider the following program: #include <iostream> #include <string> class Member { int x; int y; public: Member(int argx, int argy);
9
by: subramanian100in | last post by:
Consider the following program: #include <iostream> #include <string> #include <vector> using namespace std; template<class Tclass Vec : public vector<T> {
2
by: subramanian100in | last post by:
Consider the following program: #include <iostream> #include <map> #include <string> #include <utility> #include <algorithm> using namespace std;
3
by: subramanian100in | last post by:
Consider the following program: #include <iostream> using namespace std; class Base { public: Base(int x = 0);
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
4
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.