Pelles C forum

C language => Windows questions => Topic started by: apabird on May 17, 2020, 01:42:19 pm

Title: Depracated functions
Post by: apabird 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?
Title: Re: Depracated functions
Post by: Pelle 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.