There is your problem. DirectDraw 7 is not guaranteed to work with DirectX 9. There were some things that just could not be backwards compatible and I'm sure DirectDraw is one of them.
Attempting to use DX7 interfaces on DX9 is not a good idea. DX7 would mean the game is over 8 years old.