I once corrupted the file structure on a server at work as I was trying to expand the main partition (the c: drive) to install some updates, and as a result almost lost all of the files on it. Luckily I was able to boot it up using a Linux "recovery" CD (it just boots a stand-alone version of Linux off of the CD and had several tools on it to help try to recover a lost system), and using various tools on that CD, was able to restore the file structure back to original (and thereby allowing me to boot the server normally).
Many people don't realize that if you "delete" a file (and even empty the recycle bin), you might be able to recover the deleted files.... When a file is "deleted", the data itself isn't changed; the operating system just changes the first character in the file name to tag it so that it knows that the space on the hard-drive that the file occupied is now available for use by some other file. Because of this, there are tools that can allow a person to recover the lost file (as long as the space hadn't been used by the computer yet). So if you do realize that you accidentally deleted an important document, the best thing to do would be to turn off your computer and bring it to a computer repair shop (do NOT hibernate it since that uses the hard-drive to store the current state of the computer before it turns it off, which could mean that the "deleted" file's space may get used when hibernating the system).
As for your current problem, check out this article:
http://pcsupport.about.com/od/findbyerrormessage/a/d3dx9_32dll-dll.htm. It sounds like that dll is used by DirectX, so sometimes just updating DirectX can fix the issue for you. As the article mentions, do NOT try fixing it by downloading it. Often, hackers will use common files (like a DirectX dll library) to house some malware that gets run when the dll is ran (ie a Trojan Horse). If updating your DirectX version doesn't work, you may want to try contacting Microsoft, since they are the developers of DirectX...