You are going to want to switch your cables. Depending on your computer, some cables are labeled for Primary Master, Primary Slave, etc etc. Sometimes swapping your cables will do the trick. Taht will cause the BIOS or CMOS to do a more thorough POST test to make sure that everything (boot media, memory, system fan,, etc) is in working order. As for your hard drive problem, this could probably be resolved automatically.
If not, you are going to have to check your BIOS or CMOS setings and make sure that both hard drives are configured correctly. Make sure that your Master is the drive that you want the BIOS to acknowledge as drive C and your slave is what you want the BIOS to acknowledge as drive D. Reboot your system and look out for any error messages from the BIOS or Boot Loader. If not, then let the computer boot into Windows normally.
If not, the only other way that I could imagine you could change a drive letter is booting into a partition recovery / creation software like FDISK (standard with most MS-DOS versioins), Partition Magic, Ghost, Acronis True Image or something else and attempting to change the drive letter from there.
Either way, your system MUST realize that the SYSTEM32 folder is on C:, not D. The trick is, finding out which drive is which.
Afterwards, you might want to run a chkdsk /f /r just to make sure that everything on both drives is kosher.