Well, most of us would use RtlUncodeStringVPrintf or
RtlUncodeStringVPrintfEx. Since UNICODE_STRINGS are counted strings you do
get the value, and this is the native form in the kernel.
Don Burn
Windows Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@gmail.com
Sent: Sunday, May 18, 2014 12:53 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] _vscwprintf equivalent in the kernel?
Is there an equivalent to _vscwprintf in the kernel? In other words, given
a *printf format string and its parameters, is there a function that can
tell me the number of wchar_ts that the final string will occupy?
If there is not, this is a terrible oversight of the kernel, since it would
add a grand total of like 128 bytes to the kernel >.<
It sucks, but all the *printf variants return a fixed value, -1, if you try
passing in a null pointer as the destination or an intentionally-too-small
string. It would be nice if there were a way to ask for the output size,
like almost every other API in the entirety of Windows NT.
Melissa
NTDEV is sponsored by OSR
Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev
OSR is HIRING!! See http://www.osr.com/careers
For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars
To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer