NO

Author Topic: Depracated functions  (Read 1904 times)

Offline apabird

  • Member
  • *
  • Posts: 1
Depracated functions
« on: May 17, 2020, 01:42:19 PM »
I was playing with the Win32 API and PellesC had given me the this warning:

...main.c(93): warning #2260: The name 'StringCchPrintfW' is marked as deprecated.

Are Strsafe.h functions deprecated? What else should I use on Windows10?

Offline Pelle

  • Administrator
  • Member
  • *****
  • Posts: 2266
    • http://www.smorgasbordet.com
Re: Depracated functions
« Reply #1 on: May 17, 2020, 11:30:47 PM »
Well, the idea was to instead use ISO TR24731-1 and TR24731-2 (see Appendix in help file): functions optionally part of standard C. The problem is that few vendors have bothered to implement these functions. With new people on the C Standards Committee, there seem to be interest in removing TR24731-1 and TR24731-2.

I don't really know what is best right now. Since <strsafe.h> is mostly a bunch of inline functions, you always have the option of making it a private copy and remove the deprecate annotations.
/Pelle