To avoid errors you should always make sure your computer has updated to the latest version of DirectX. If none of the previous solution works, you should try updating DirectX. The way to check whether your DirectX is the latest version is downloading DirectX Runtime Web Installer from Microsoft's official website. Download the setup file and run it. Then you can follow on-screen steps to reinstall it. When installation completes, you need to restart computer.
Nevertheless, I was also getting the blue screen of death (BSOD) error because I had not included enough memory. It was a bit annoying since I was already having problems with Windows 8 before I even started trying to somehow understand how to gain back some of the features through a virtual machine. It appears that the Windows 8 thing is part of some bigger problem that only Microsoft fully understands.
When you set up a Windows 8 VM in VirtualBox, you will have a window that allows you to set the amount of memory to use for the Windows 8. The maximum amount is 32 MB. And yet, I was getting a BSOD. At one point I think I was probably using 14.5 GB which was just over the base memory limit of 10.8 GB. d2c66b5586