NO

Author Topic: Printf ws error?  (Read 2153 times)

Offline bitcoin

  • Member
  • *
  • Posts: 179
Printf ws error?
« on: April 27, 2020, 05:16:03 PM »
Code such as
Code: [Select]
WCHAR wchCompName[256];
DWORD dwSize = 255;

if (GetComputerNameW(wchCompName, &dwSize))
printf("%ws\n", wchCompName);
print 'ws', not unicode string. Why?

Offline TimoVJL

  • Global Moderator
  • Member
  • *****
  • Posts: 2115
Re: Printf ws error?
« Reply #1 on: April 27, 2020, 08:02:46 PM »
use %ls and read help file
May the source be with you

Ricardo Bermudez

  • Guest
Re: Printf ws error?
« Reply #2 on: April 28, 2020, 12:44:13 AM »
use %ls and read help file

That was going to say