There\'re certain cases when I really need strncpy() funcitonalty - for example I have a function in a predefined interface that is passed an address of the buf
strncpy()
You want null-termination where actualLength < length, and no null-termination where actualLength == length, right?
actualLength < length
actualLength == length
So use strncpy_s for the case where actualLength < length and memcpy_s where actualLength == length.
strncpy_s
memcpy_s