I am afraid that you have a difficult problem. I would suggest not trying to solve it yourself.
Please note that in addition to providing physical rewriting of the file (which may be via LAN, flash or something else) you will have to take care of any application caches, Windows sleep mode files, Windows recovery files, Windows swap file, and all copies or old ones to be erased versions of these files (swap all the empty space or, even worse, the space in which the cache used to be, and possibly allocated to other files) - everything is in the correct order.
I think your chances may be better if you can store your files on a dedicated logical (or even physical) disk that is not used by the OS or other applications, and if you convince Windows not to replace the memory that you use to store the file while in RAM (using VirtualLock ()). However, you must delete the swap, cache, etc.
In addition, you must integrate the Eraser product into the application (Eraser is free software and its source code is released under the GNU General Public License).
Lior kogan
source share