469,572 Members | 1,279 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,572 developers. It's quick & easy.

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 13353
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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

8 posts views Thread by Uwe Mayer | last post: by
4 posts views Thread by Lieven | last post: by
45 posts views Thread by Matt Parkins | last post: by
9 posts views Thread by Robert | last post: by
1 post views Thread by user | last post: by
3 posts views Thread by Tony | last post: by
5 posts views Thread by Scirious | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.