DWORD * ptr;
DDSURFACEDESC2 desc;
int pixelsperrow;
HRESULT hRet;
RECT rect;
memset(&desc, 0, sizeof(DDSURFACEDESC2));
hRet = m_GS->getBackBuffer()->Lock(NULL, &desc, DDLOCK_SURFACEMEMORYPTR | DDLOCK_NOSYSLOCK | DDLOCK_WAIT, NULL);
FAILED_THROW_DD("Lock failed with value of: ", hRet, INFO);
ptr = (DWORD*)desc.lpSurface;
pixelsperrow = desc.lPitch/4;
for(int i=0;i<500;i++)
ptr[i+i*pixelsperrow] = i;
m_GS->getBackBuffer()->Unlock(0);
FAILED_THROW("Restore failed with value of: ", hRet, INFO);
DX7 Surface Lock function
I have the following code:
the Lock fails, getting the return value of -2147024809 which I believe to be "One or more of the parameters passed to the method are incorrect." Any ideas?
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement