what is the usage about _Out_opt_bytecapcount_
-
When say the define of function memcpy, I say it. _CRT_INSECURE_DEPRECATE_MEMORY(memcpy_s) void * __cdecl memcpy(_Out_opt_bytecapcount_(_Size) void * _Dst, _In_opt_bytecount_(_Size) const void * _Src, _In_ size_t _Size); I say the file sal.h, it says that the macro will tell the compile what the usage about this function. but I do not know the compile will do any operation about this macro. If prompt any error when compiling?
-
When say the define of function memcpy, I say it. _CRT_INSECURE_DEPRECATE_MEMORY(memcpy_s) void * __cdecl memcpy(_Out_opt_bytecapcount_(_Size) void * _Dst, _In_opt_bytecount_(_Size) const void * _Src, _In_ size_t _Size); I say the file sal.h, it says that the macro will tell the compile what the usage about this function. but I do not know the compile will do any operation about this macro. If prompt any error when compiling?
That macro tells you that you shouldn't use that function because it is prone to errors and exploits. Use
memcpy_s
instead.The difficult we do right away... ...the impossible takes slightly longer.