lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]



Hello Robert,

It gives myriad of complains about so-called "deprecated" functions
which is un-avoidable, because Microsoft wants everyone to use
the _s variants of those functions.

What are the "_s variants of those functions"?


Microsoft decided to add new variant of most string related functions
which explicitly receives the length of the receiving buffer.
These functions are named after the function they replace with trailing _s, ex:

char *strcpy(
   char *strDestination,
   const char *strSource
);

becomes

errno_t strcpy_s(
   char *strDestination,
   size_t sizeInBytes,
   const char *strSource
);

You can find more info in article "Security Enhancements in the CRT" published in
http://msdn2.microsoft.com/en-us/library/8ef0s5kh.aspx
The default in VisualStudio 2005 is to mark all the standart functions with special
__declspec(deprecated) attribute which
gives a warning and points the programmer to MSDN where she can
learn how to change code to use new functions.

Hope this will help,

Todor