Good evening!
I can not display the string LPTSTR ... Here is the code:
char *buffer[UNLEN + 1]; // буфер DWORD size; // размер size = sizeof(buffer); // размер буфера if (GetUserName((LPWSTR) buffer, &size) == 0) printf("Error GetUserName"); // при ошибке функция вернет 0 printf("%s", buffer); getch(); return 0;
Only the 1st letter is displayed ... What is the error? And what function can display the range of available memory addresses?
Thank!