Just from previous experience, as I have had a similar error in older xp games running under vista, Google d3dx9.dll and put in the FREE-TRACK INSTALLATION PATH... not in system32 as it always is a pain. Other solution is to get the DirectX SDK pack (about 500mb) and install it, it may include that dll. but you better give the first solution a go first.
dll link:
http://megaupload.com/?d=FXUCZVE0
If link is wrong Google dll-files and in that site search the exact name of the screwed up dll.