death_oclock 103 Posting Whiz

I am making a blitting call on my backbuffer:

BOOL drawImage(IMAGE *lpImage, LONG x, LONG y)
{
	RECT rect;

	rect.left = x;
	rect.top = y;
	rect.right = x + lpImage->lWidth;
	rect.bottom = y + lpImage->lHeight;

	dwVideoErrCode = lpBack->Blt(&rect, lpImage->lpSurface, NULL, DDBLT_WAIT | DDBLT_KEYSRC, NULL);
	if(dwVideoErrCode != DD_OK)
	{
		MessageBox(NULL, L"Failed to blit image to backbuffer.", L"Error!", MB_ICONEXCLAMATION | MB_OK);
		return FALSE;
	}

	return TRUE;
}

Blt() fails and return the error code -2005532242 or 0x887601ae in hexadecimal.
My problem is that I can't find out what this code means because Microsoft decided not to list DirectDraw return values by number. If anyone could find out what this error is supposed to be, that would really help me out in fixing the problem.

Solution: I found a site with source code to dxerr.c, which listed all the return values and their numeric values. Apparently my error is DDERR_SURFACEBUSY

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.