All the values seem correct?
No NULL HDC's or -ve coods? (or coods off the image)
Have not wiped the HDC or BMP?
Look the error up in the help
sprintf(sBuffer,"BitBlt failed with error %d.", iError);
0 = error success (you don't want to see this)
87 = incorrect param
You are Being very careful with your GDI memory? ReleaseDC() any GetDC() and DeleteObject() any CreateXX()'s (not while selected into a DC)