Iam using DirectDraw Component to create primary surface in windowed mode , when i try to lock
the primary surface to acess the primary surface memory , it works, but some times it won't allow me to lock the surface it gives me DDERR_GENERIC. This problem persists until i exit from the application. Can any one help me.
Here is the code
hr = lpDDSPrimary->Lock( NULL , &ddsd, DDLOCK_WAIT |DDLOCK_SURFACEMEMORYPTR | DDLOCK_READONLY , NULL );
// i will do processing of surface here
CString eMsg="Error in lock ";
throw "Error Unable to Lock Surface";
Thnaks in advance