Have you looked at Direct3D9.pas? Cos error messages you are getting are a bit weird. Especcially if we assume what about 40 first lines in this file are comments, and compiler can't (?) complain about them.

After changing any INC file - it's recomended to fully rebuild all you projectes referencing that file.