windows-nt/Source/XPSP1/NT/base/ntsetup/textmode/kernel/spprintf.h

45 lines
935 B
C
Raw Permalink Normal View History

2020-09-26 03:20:57 -05:00
/*++
Copyright (c) 2000 Microsoft Corporation
Module Name:
spprintf.h
Abstract:
safer sprintf variants
Author:
Jay Krell (a-JayK) November 2000
Revision History:
--*/
#pragma once
#include <stdarg.h>
//
// _snprintf and co. do not write a terminal nul when the string just fits.
// These function do.
//
// use instead of VsNprintf or Vsprintf
// VN V
void SpFormatStringVaA(PSTR Buffer, SIZE_T Size, PCSTR Format, va_list Args);
// use instead of sNprintf or sprintf
// N .
void __cdecl SpFormatStringA(PSTR Buffer, SIZE_T Size, PCSTR Format, ...);
// use instead of VsNWprintf or VsWprintf
// VNW VW
void SpFormatStringVaW(PWSTR Buffer, SIZE_T Size, PCWSTR Format, va_list Args);
// use instead of sNWprintf or sWprintf
// NW W
void __cdecl SpFormatStringW(PWSTR Buffer, SIZE_T Size, PCWSTR Format, ...);
NTSTATUS __cdecl SpFormatStringWToA(PSTR Buffer, SIZE_T Size, PCWSTR Format, ...);