>>copy all the contents of one partition
I don't know what that means. Copy all the files? such as all files/folders on C: to D: ?
Here is the code you need. It will give you the list of all he files and directories. Use the win32 api function CopyFile() to do the actual copying.