Compartilhar via


vfprintf, vfwprintf (Windows CE 5.0)

Send Feedback

Developing an Application > Microsoft C Run-time Library for Windows CE > Run-time Library Reference > vprintf Functions

Write formatted output using a pointer to a list of arguments.

int vfprintf( FILE *stream, constchar *format, va_list argptr );int vfwprintf( FILE *stream, constwchar_t *format, va_listargptr);

Parameters

  • stream
    Pointer to FILE structure.
  • format
    Format specification.
  • argptr
    Pointer to list of arguments.

Return Values

vfprintf and vfwprintf return the number of characters written, not including the terminating null character, or a negative value if an output error occurs.

Remarks

These functions are supported by all versions of the C run-time libraries.

Each of these functions takes a pointer to an argument list, then formats and writes the given data to stream.

The string to be printed must not be larger than the maximum number of bytes allowed in the buffer; otherwise, a buffer overrun can occur.

This can lead to a denial of service attack against the application if an access violation occurs, or in the worst case, allow an attacker to inject executable code into your process. Consider using an appropriate strsafe function.

For more information, see Safe String Functions.

The following table shows generic-text routine mappings for this function.

TCHAR.H Routine _UNICODE Defined
_vftprintf vfwprintf

For more information about TCHAR.H routines, see Generic Text Mappings.

Requirements

OS Versions: Windows CE 2.0 and later.

Header: stdarg.h, stdlib.h, wtypes.h.

Link Library: coredll.dll.

See Also

fprintf | printf | sprintf

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.