Tech Support > Microsoft Windows > Drivers > _vsnprintf problem;
_vsnprintf problem;
Posted by krish on June 12th, 2008


I'm facing some problems while using _vsnprintf in diskperf.c.

When I use: length = _vsnprintf (text, sizeof (text) - 1,
DebugMessage, ap); I get a warning "warning C4995: '_vsnprintf': name
was marked as #pragma deprecated".

So used the safer version as: length = _vsnprintf_s (text, sizeof
(text), sizeof (text) - 1, DebugMessage, ap); But then I got the
errors:

diskperf.obj : "error LNK2019: unresolved external symbol
__vsnprintf_s referenced in function _DebugPrint"
diskperf.sys : "error LNK1120: 1 unresolved externals"

It appears that I need to link some other (shared)object. Any help?
Thanks.

Posted by Praveen Kumar Amritaluru on June 12th, 2008


What is the OS version for which you are compiling?

vsnprint is deprecated on Vista & above.
RtlStringCbVPrintfA needs to be used instead.



"krish" <pradeep_bisht@yahoo.com> wrote in message
news:9ca80cc8-7098-43e2-ae6c-b29945b85b53@x1g2000prh.googlegroups.com...


Posted by krish on June 12th, 2008


Thanks Praveen.


On Jun 12, 4:30 am, "Praveen Kumar Amritaluru"
<apraveen.ku...@gmail.com> wrote:


Similar Posts