This is caused when dll file(s) from DirectX Runtime is missing.
The most common 4 files (of DirectX runtime) that can get corrupted are: xinput1_3.dll, XAPOFX1_5.dll, X3DAudio1_7.dll, D3DCompiler_43.dll.Go to https://www.microsoft.com/en-us/download/details.aspx?id=8109 and download DirectX End-User Runtimes (June 2010)
2. Run the downloaded file. When it asks for a location to install, select some folder which you can easily find in any location and click OK
3. Go to the folder where you extraced the files and run DXSETUP.exe, proceed with the installation normally.
In case you reinstalled and it's still the same error, you have file corruption, Follow step 2 given below
Go to both C:\Windows\SysWOW64 and C:\Windows\system32 and manually delete the file mentioned in the error message.
Re-run the DirectX Installer after the deletion. (Refer to Step 1.3)
The most common 4 files (of DirectX runtime) that can get corrupted are: xinput1_3.dll, XAPOFX1_5.dll, X3DAudio1_7.dll, D3DCompiler_43.dll.