mirror of
https://github.com/janbodnar/Windows-API-examples.git
synced 2024-11-14 15:55:30 +00:00
18 lines
400 B
C
18 lines
400 B
C
#include <windows.h>
|
|
#include <wchar.h>
|
|
|
|
int wmain(int argc, wchar_t **argv) {
|
|
|
|
PDWORD cChars = NULL;
|
|
HANDLE std = GetStdHandle(STD_OUTPUT_HANDLE);
|
|
|
|
if (std == INVALID_HANDLE_VALUE) {
|
|
wprintf(L"Cannot retrieve standard output handle\n (%d)",
|
|
GetLastError());
|
|
}
|
|
|
|
WriteConsoleW(std, argv[1], wcslen(argv[1]), cChars, NULL);
|
|
|
|
return EXIT_SUCCESS;
|
|
}
|