/*++ Title: DbgPrint Routine Description: Format the string similar to sprintf and output it in the debugger. Arguments: pszFmt pointer format string. .. variable number of arguments similar to sprintf. Return Value: 0 --*/ BOOL DebugPrint( _In_ PCH pszFmt, ... ) { LPSTR pszString = NULL; BOOL bReturn; va_list pArgs; va_start( pArgs, pszFmt ); pszString = vsntprintf( pszFmt, pArgs ); bReturn = !!pszString; va_end( pArgs ); if (pszString) { OutputDebugStringA(pszString); FreeSplMem(pszString); } return bReturn; }
_SNPRINTF_DLLIMPORT int __cdecl sntprintf( _TCHAR *buffer, size_t count, const _TCHAR *format, ... ) { va_list list; int retval; va_start( list, format ); retval = vsntprintf( buffer, count, format, list ); va_end( list ); return retval; }