Article View: borland.public.cppbuilder.nativeapi
Article #2643Re: wsprintfW error
From: Remy Lebeau (TeamB)
Date: Sun, 21 Jan 2007 06:30
Date: Sun, 21 Jan 2007 06:30
21 lines
1654 bytes
1654 bytes
"Tobias" <toasdf.asdfl2@asdf.se> wrote in message news:45b2f5d0$1@newsgroups.borland.com... > I get this error when i try to use it [C++ Error] Unit2.cpp(179): E2451 > Undefined symbol 'wsprintf_instead_use_StringCbPrintf_or_StringCchPrintf' The error is intentional. Like the message says, wsprintf() has been replaced with StringCbPrintf() and StringCchPrintf(). wsprintf() is deprecated and is considered unsafe. So are similar functions, such as lstrcpy(). Microsoft designed its newer Win32 SDK headers to intentionally fail with linker errors on such functions. In order to see that message in the first place, you obviously have the newer headers installed. So you should do what the message says and use StringCbPrintf() or StringCchPrintf() instead of wsprintf() from now on. Gambit
Technical Details
Message-ID:
<45b30886$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!news2.google.com!news.germany.com!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<45b2f5d0$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,8f6fc0128947a313 X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <45b2f5d0$1@newsgroups.borland.com> Subject: Re: wsprintfW error Date: Sat, 20 Jan 2007 22:30:51 -0800 Lines: 23 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 NNTP-Posting-Host: 75.83.34.171 Message-ID: <45b30886$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1169361030 75.83.34.171 (20 Jan 2007 22:30:30 -0800) Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!news2.google.com!news.germany.com!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail