473,395 Members | 1,692 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 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 5107
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);
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.