Quantcast
Viewing all articles
Browse latest Browse all 6

how do you clone a hard drive

IClonable.Clone is not what you are looking for - this just creates a copy of a .NET managed object.

To clone a disk/partition you'd use some low level APIs.

First you open a handle to the reguestet 'logical volume' by calling the Win32 API CreateFile. Details how to use this API can be found here: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/fs/createfile.asp
The section 'Physical Disks and Volumes' explains the special filenames used to open a volume handle.

Then read the contents of the disk using the normal (.NET) APIs.
You may need to read sector aligned. The following sample shows how to find the sector size: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/devio/base/calling_deviceiocontrol.asp

Hope this puts you in the right direction


Viewing all articles
Browse latest Browse all 6

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>