The problem is you did not declare a surface called bitmap_surface. I'm not sure how to do this using DX7, I would guess just replace the 9 with a 7, but I hope this helps. Maybe you just missed something in your book.