NO

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

Offline bitcoin

  • Member
  • *
  • Posts: 95
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: 1893
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

Offline Ricardo Bermudez

  • Member
  • *
  • Posts: 2
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