Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

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?

share|improve this question
add comment

1 Answer 1

up vote 5 down vote accepted

Use the DirectX Error Lookup tool that's found in the SDK.

Passing this value in it returns the following result:

HRESULT: 0x80070057 (2147942487)
Name: E_INVALIDARG
Description: An invalid parameter was passed to the returning function
Severity code: Failed
Facility Code: FACILITY_WIN32 (7)
Error Code: 0x0057 (87)

You have an invalid argument passed into the function. Check the contents of your parameters.

share|improve this answer
    
+1 for keying me on to the error lookup tool. –  J Junker Feb 3 '11 at 0:18
1  
You may also find it useful to enable the Debug runtimes (via the DirectX control panel, which is accessible under the DX SDK's Start Menu entry). This will print some additional useful diagnostic information to the output window at runtime which can sometimes help clarify DX's otherwise-very-general error messages. –  Josh Petrie Feb 3 '11 at 1:24
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.