Question

The MSDN documentation says that D3D11CreateDevice returns one of the Direct3D 11 Return Codes. Among them is D3DERR_INVALIDCALL. But where is D3DERR_INVALIDCALL defined? Am using the newst Windows SDK. Which header file do I need to include?

Was it helpful?

Solution

D3D11CreateDevice always returns one of the D3D11 Return Codes, but it doesn't necessarily return all of them. D3DERR_INVALIDCALL should never be returned by D3D11CreateDevice since it is a D3D9 error code, and defined only in d3d9.h.

In general, unless you are going to retry the call with different arguments (e.g. by permitting lower feature levels), failing D3D11CreateDevice should be considered an unrecoverable error and you should abort the program.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top