So this error message has been doing the rounds lately.
This application has failed to start because d3dx9_32.dll was not found.
Or other error messages around d3dx9.dll, dxdx9d.dll, d3dx10.dll, xinput.dll, xact.dll, d3dx10_33.dll, d3dx9_40.dll and other variations being missing, not being found or installed.
These are all optional components to DirectX that may not be installed with the version of DirectX you already have on your system.
Typically these will be installed when the game installs DirectX, however for historical reasons a lot of gamers, knowing they had the latest version of DirectX didn't bother (I never do either). Microsoft a couple of years back provided these optional components in the SDK, and as such may not be installed with the version of DirectX present on your system.
Games I've come across with this happening range from
Age of Empires III (3).
Caesar IV (4).
Civilization IV (4).
The Elder Scrolls IV: Oblivion.
Ghost Recon Advanced Warfighter.
Ghost Recon Advanced Warfighter 2.
Hitman Blood Money.
The Lord of the Rings: The Battle for Middle-Earth
The Lord of the Rings: The Battle for Middle-Earth 2.
Need For Speed Most Wanted.
I'm sure there's probably a couple of dozen more games, feel free to list any additions in the comments below.
The solution is to either install the version of DirectX on the game's disc, or download the latest DirectX End-User Runtime from Microsoft (at the moment this is being redirected to the Games for Windows website), or from the Download Center.