I wish to securely delete (not even a trace in memory) anything that user types into a textbox. I wonder if setting it to ""
is secure enough.
SetWindowText
is a function in Win32 API, in user32.dll.
In the program:
SetWindowText(myHandle, "Hello");
SetWindowText(myHandle, "Goodbye");
//Was the buffer containing chars "Hello" overwritten by the
//series of chars "Goodb"?
//Or was another chunk of buffer being allocated to store "Goodbye",
//hence "Hello" still exist somewhere in the memory?
SetWindowText(myHandle, "");
//What does Windows do to the buffer that used to store chars "Goodbye"?
//Does it wipe out and replace the data in the buffer to all 0s here?
//Or does "Goodbye" actually still stays in the memory?