Why does ZeroMemory(), and similar calls exist in the Windows API when there are memset and related calls in the C standard library already? Which ones should I
ZeroMemory()
Actually, what you want to use is SecureZeroMemory().
An optimizing compiler can remove calls to memset(), and SecureZeroMemory() is designed to prevent this.
memset()
SecureZeroMemory()
I used to think the ZeroMemory() calls were unnecessary until I came across this fact.