Original Post
Hello. My program freezes and the compiler points to the error on the Lock() function call.
memset(&ddsd, 0, sizeof(ddsd));
ddsd.dwSize = sizeof(ddsd);
//lock the whole primary surface
if (FAILED(lpddsprimary->Lock(NULL, &ddsd, DDLOCK_SURFACEMEMORYPTR | DDLOCK_WAIT, NULL )))
Am I doing anything wrong here? Please help me out.