| 12 | #define MAX_CHARS_BIG 8096 |
| 13 | |
| 14 | void PrintWide ( const wchar_t * format, ... ) |
| 15 | { |
| 16 | wchar_t buffer[MAX_CHARS_SMALL]; |
| 17 | memset(buffer, 0, MAX_CHARS_SMALL); |
| 18 | va_list args; |
| 19 | va_start ( args, format ); |
| 20 | wprintf(L"format starts with 0x%x\n", *(int*)format); |
| 21 | wprintf(L"fmt continues with 0x%x\n", *(((int*)format) + 1)); |
| 22 | wprintf(L"fmt continues with 0x%x\n", *(((int*)format) + 2)); |
| 23 | int r = vswprintf ( buffer, MAX_CHARS_SMALL-1, format, args ); |
| 24 | wprintf(L"vswprintf told us %d\n", r); |
| 25 | wprintf(L"vswoutput st-rts with 0x%x\n", *(int*)buffer); |
| 26 | wprintf(L"vsw continues with 0x%x\n", *(((int*)buffer) + 1)); |
| 27 | wprintf(L"vsw continues with 0x%x\n", *(((int*)buffer) + 2)); |
| 28 | wprintf(buffer); |
| 29 | va_end ( args ); |
| 30 | } |
| 31 | |
| 32 | void PrintBigWide ( const wchar_t * format, ... ) |
| 33 | { |