This error occurs if the video card drivers are out of date.
Before updating your drivers, please visit Windows Update and make sure that you have all of the critical updates and the .NET framework installed.
If you get a Failed to create D3D device error, please update your video card drivers to the latest version.
You can use the dxdiag tool to view your DirectX information. A dxdiag will show what driver version you have, what video card is in the system and so on and may provide valuable data on your system.
If you have the latest drivers for your video card and are still seeing the failures it's possible that your system has gotten into an unusual state. Restarting your system may reset things to a working state.