If the code compiles /kernel and in the links properly WDK build environment, the API itself is supported (underneath the covers, RtlSTringcchPrintfA calls _vsnprintf).
How to generate error or warning, if C/C++ run time libraries used driver
Raj kumar Kamsani
1
Reputation point
I have sample driver code, and in some part of the code sprintf() and other C/C++ functions are being used and compiler is not generated error as I included ntstrsafe.h header file in the project.
Currently sprintf() has been replaced with RtlStringCchPrintfA as suggested from MSDN docs, but I would like to generate the warning/error if such functions are being used in kernel space. How to do that. Please let me know.