RtWprintf
RtWprintf prints formatted output to the standard output stream or console window.
Syntax
INT RtWprintf( const WCHAR *fmt [, argument, . . .] );
Parameters
lpFormat
The format control with optional arguments.
Return Value
The number of wide characters printed, if the function succeeds, a negative value if the function fails
Remarks
RtWprintf is similar to wprintf, but RtWprintf does not require the Microsoft C Runtime library and can work with any combination of run-time libraries.
NOTE: This function does not support floating point conversions in the RTSS environment.
RtWprintf formats and prints a series of characters and values to the standard output stream, stdout. If arguments follow the format string, the format string must contain specifications that determine the output format for the arguments.
The format argument consists of ordinary characters, escape sequences, and (if arguments follow format) format specifications. The ordinary characters and escape sequences are copied to stdout in order of their appearance.
Format specifications always begin with a percent sign (%) and are read left to right. When RtWprintf encounters the first format specification (if any), it converts the value of the first argument after format and outputs it accordingly. The second format specification causes the second argument to be converted and output, and so on. If there are more arguments than there are format specifications, the extra arguments are ignored. The results are undefined if there are not enough arguments for all the format specifications.
Requirements
Minimum Supported Version | RTX64 2013 |
Header | Rtapi.h |
Library | RtApi.lib (Windows), Rtx_Rtss.lib (RTSS) |
Example
RtWprintf(L"Line one\n\t\tLine two\n");
produces the output:
Line one Line two
Format Specification Fields
See the format specification fields in the Comments section of RtPrintf for details.
See Also: