473,385 Members | 1,256 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,385 software developers and data experts.

wsprintf deprecated?

When I compile my solution I get the following output -

NET 2003\Vc7\atlmfc\include\atlwin.h(2027) : warning C4995:
'wsprintf': name was marked as #pragma deprecated
C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\atlmfc\include\atlwin.h(2027) : warning C4995: 'wsprintfA':
name was marked as #pragma deprecated
C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\atlmfc\include\atlwin.h(2211) : warning C4995: 'wsprintf':
name was marked as #pragma deprecated
C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\atlmfc\include\atlwin.h(2211) : warning C4995: 'wsprintfA':
name was marked as #pragma deprecated
C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\atlmfc\include\atlwin.h(3863) : warning C4995: 'lstrcpy':
name was marked as #pragma deprecated
C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\atlmfc\include\atlwin.h(3863) : warning C4995: 'lstrcpyA':
name was marked as #pragma deprecated

If I'm not suppose to use wsprintf() then what am I suppose to use?
It's quite frustrating for me as I look on the docs for this function
and no mention of it being deprecated can be found. I get the same
thing for lstrcat, lstrlen, etc. I choose to not use strcpy(),
sprintf(), etc. because I'm not using CRT functions. I want to use the
Win32 equivalents.
Nov 17 '05 #1
3 13626
I don't really know, but these look like the kind of messages that strsafe.h
reports. Do you either directly or indirectly #include it?

http://msdn.microsoft.com/library/de...efunctions.asp

"Ben Rush" <kw*****@yahoo.com> wrote in message
news:d6**************************@posting.google.c om...
When I compile my solution I get the following output -

NET 2003\Vc7\atlmfc\include\atlwin.h(2027) : warning C4995:
'wsprintf': name was marked as #pragma deprecated
C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\atlmfc\include\atlwin.h(2027) : warning C4995: 'wsprintfA':
name was marked as #pragma deprecated
C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\atlmfc\include\atlwin.h(2211) : warning C4995: 'wsprintf':
name was marked as #pragma deprecated
C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\atlmfc\include\atlwin.h(2211) : warning C4995: 'wsprintfA':
name was marked as #pragma deprecated
C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\atlmfc\include\atlwin.h(3863) : warning C4995: 'lstrcpy':
name was marked as #pragma deprecated
C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\atlmfc\include\atlwin.h(3863) : warning C4995: 'lstrcpyA':
name was marked as #pragma deprecated

If I'm not suppose to use wsprintf() then what am I suppose to use?
It's quite frustrating for me as I look on the docs for this function
and no mention of it being deprecated can be found. I get the same
thing for lstrcat, lstrlen, etc. I choose to not use strcpy(),
sprintf(), etc. because I'm not using CRT functions. I want to use the
Win32 equivalents.

Nov 17 '05 #2
"Ben Rush" <kw*****@yahoo.com> wrote in message
news:d6**************************@posting.google.c om...
When I compile my solution I get the following output -

NET 2003\Vc7\atlmfc\include\atlwin.h(2027) : warning C4995:
'wsprintf': name was marked as #pragma deprecated
<snip>
If I'm not suppose to use wsprintf() then what am I suppose to use?
It's quite frustrating for me as I look on the docs for this function
and no mention of it being deprecated can be found. I get the same
thing for lstrcat, lstrlen, etc. I choose to not use strcpy(),
sprintf(), etc. because I'm not using CRT functions. I want to use the
Win32 equivalents.


Use the String* family of functions. StringCchPrintf is probably a
replacement
for wsprintf. Security improvement measures.

BTW. it's all documented in the platform SDK docs.

Sarat Venugopal
www.huelix.com
Nov 17 '05 #3
Well, then MS needs to read their own docs because atlbase.h is one of
the sources of the problem.

Is there a way around this or do I have to just turn off the pragma
warnings manually?

"Sarat Venugopal" <de***********@huelix.com> wrote in message news:<u1*************@TK2MSFTNGP11.phx.gbl>...
"Ben Rush" <kw*****@yahoo.com> wrote in message
news:d6**************************@posting.google.c om...
When I compile my solution I get the following output -

NET 2003\Vc7\atlmfc\include\atlwin.h(2027) : warning C4995:
'wsprintf': name was marked as #pragma deprecated


<snip>
If I'm not suppose to use wsprintf() then what am I suppose to use?
It's quite frustrating for me as I look on the docs for this function
and no mention of it being deprecated can be found. I get the same
thing for lstrcat, lstrlen, etc. I choose to not use strcpy(),
sprintf(), etc. because I'm not using CRT functions. I want to use the
Win32 equivalents.


Use the String* family of functions. StringCchPrintf is probably a
replacement
for wsprintf. Security improvement measures.

BTW. it's all documented in the platform SDK docs.

Sarat Venugopal
www.huelix.com

Nov 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Uwe Mayer | last post by:
Hi, Why is the UserDict module is deprecated after Python 2.2. The application of it I have in mind is, i.e. multiple inheritance from "file" and "dic" - which is not possible. If I used...
2
by: gf gf | last post by:
I read that lower() is deprecated. Unfortunately, I can't find the preferred way of lowercasing a string. What is it? Thanks PS Please cc me on all responses.
26
by: puzzled | last post by:
Okay, so my subject sounds a bit crass. As much as I'd like to totally embrace css and avoid "deprecated" usage, sometimes the deprecated stuff is so much easier and more effective. Plus, it at...
4
by: Lieven | last post by:
I'm trying to use is_sorted. When I do #include<algo.h>, I get: /usr/include/g++/backward/backward_warning.h:32:2: warning: #warning This file includes at least one deprecated or antiquated...
45
by: Matt Parkins | last post by:
Hi, (I realise this probably isn't precisely the right group for this - could someone direct me to the appropriate group to post this question? - thanks !) I'm using Visual C++ 2005 Express...
9
by: Robert | last post by:
Hi, Currently I am using argument.callee.caller.arguments to get the arguments of the caller function, but Firefox complains that arguments (of Function) is deprecated. Is there a way to get...
1
by: user | last post by:
Hello Can i use wsprintf in C#? is there any similar function ? Thanx
3
by: Tony | last post by:
At http://www.quirksmode.org/js/placejs.html I found a discussion on how & where to place your javascript. Toward the bottom of the page, PPK has a section titled Deprecated: Direct JavaScripts,...
5
by: Scirious | last post by:
People, how many deprecated methods have really been removed and no longer exists? TIA, Scirious.
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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...

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.