I'm getting a failure returned when calling Direct3DDevice->CreateDepthStencilSurface(). But rather than returning one of the values that the documentation says it should return (D3DERR_NOTAVAILABLE, D3DERR_INVALIDCALL, D3DERR_OUTOFVIDEOMEMORY, E_OUTOFMEMORY), it returns error code 80070057. What does this mean?
Use the DirectX Error Lookup tool that's found in the SDK.
Passing this value in it returns the following result:
HRESULT: 0x80070057 (2147942487)
You have an invalid argument passed into the function. Check the contents of your parameters.