I bet you're right, you do declare variables twice, which is probably your entire problem.
Remove these lines:
//Pointer 2 ddraw obj
//used to hold the DirectDraw surface description
//Where the interface pointer will be placed when the surface is created
from your initialization -- these are already declared as globals.
Okay that solved the problem man did i make a stupid mistake well atleast i learned some debuging skills. Thanks for all your help.