Download d3dx9_42.dll file from this site::http://www.dll-files.com/dllindex/dll-files.shtml?d3dx9_42
After downloading::Extract d3dx9_42.dll from d3dx9_42.zip. We recommend that you extract d3dx9_42.dll to the installation directory of the program that is requesting d3dx9_42.dll.
If that doesn't work, you will have to extract d3dx9_42.dll to your system directory. By default, this is:
C:\Windows\System (Windows 95/98/Me)
C:\WINNT\System32 (Windows NT/2000)
C:\Windows\System32 (Windows XP, Vista, 7)
If you use a 64-bit version of Windows, you should also place d3dx9_42.dll in C:\Windows\SysWOW64\
Make sure overwrite any existing files (but make a backup copy of the original file).
Reboot your computer.
If the problem still occurs, try the following:
Open Windows Start menu and select "Run...".
Type CMD and press Enter (or if you use Windows ME, type COMMAND)).
Type regsvr32 d3dx9_42.dll and press Enter.