Click here to Skip to main content
15,897,891 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
To erase the magnetic media, I need to overwrite hard disk or drive many times with alternative patterns in order to expose it to a magnetic field.
Posted
Comments
Maciej Los 16-Jul-13 3:53am    
And what have you done so far? Where are you stuck? What's a question?

1 solution

Be extremely carefull with this code: http://blogs.msdn.com/b/jeffrey_wall/archive/2004/09/13/229137.aspx[^] - it wraps the Defrag API in a C# wrapper so you can use it directly from .NET
That should allow you access to the unused disk file map, so you can overwrite it.

CAVEAT: I haven't tried it, I wouldn't touch it with a ten foot cattle prod, and if you destroy your own file system by accident don't come crying to me...

Personally, I'd use one of the commercial products, as there are far, far too many things that could go wrong in development and destroy my "live" disk...but it's your risk.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900