The snprintf family of functions has no appropriate replacements and should not be marked deprecated mustfix. In particular, snprintf can be used in the absence of a buffer (represented by a null buffer of zero length) to determine the required buffer size. NTStrSafe replacements such as RtlStringCbPrintf simply are not designed to return the required buffer size in any way, while the snprintf_s family consider a null buffer of zero length a programming error that results in the invocation of the invalid argument handler.
The fix would be trivial: implement the _scprintf family of functions in the WDK.
The
snprintffamily of functions has no appropriate replacements and should not be marked deprecated mustfix. In particular,snprintfcan be used in the absence of a buffer (represented by a null buffer of zero length) to determine the required buffer size. NTStrSafe replacements such asRtlStringCbPrintfsimply are not designed to return the required buffer size in any way, while thesnprintf_sfamily consider a null buffer of zero length a programming error that results in the invocation of the invalid argument handler.The fix would be trivial: implement the
_scprintffamily of functions in the WDK.