Members may post updates or alternatives to this current article in order to show different
approaches or add new features.
I assume you are trying to write a secure delete application?That is not as easy as you think...Google is your friend here: Secure delete c++[^] - but be prepared for some work, it is not at all easy. Just think about SSDs - they don't write where they tell you they are, just mark the old...
As far as I know, it is impossible to write to a specific sector on disk through win32 API. You need to write a driver using low-level kernel API.
Another resource is the SysInternals utilities. There are some interesting file system utilities with source code there.