Error codes that can be returned by a DXGI function.
| Name | Description |
|---|---|
| DXGI_ERROR_ACCESS_DENIED | The application is trying to use a resource to which it does not have the required access privileges. This is most commonly caused by writing to a shared resource with read-only access. |
| DXGI_ERROR_ACCESS_LOST | For Xbox One: The keyed mutex was abandoned. For desktop: The desktop duplication interface is invalid. The desktop duplication interface typically becomes invalid when a different type of image is displayed on the desktop. |
| DXGI_ERROR_CANNOT_PROTECT_CONTENT | DXGI is unable to provide content protection on the swapchain. This is typically caused by an older driver, or by the application using a swapchain that is incompatible with content protection. |
| DXGI_ERROR_DEVICE_HUNG | The application’s device failed due to badly formed commands sent by the application. This is a design-time issue that should be investigated and fixed. The GPU will not respond to more commands, most likely because of an invalid command passed by the calling application. |
| DXGI_ERROR_DEVICE_REMOVED | The video card has been physically removed from the system, or a driver upgrade for the video card has occurred. The application should destroy and recreate the device. For help debugging the problem, call ID3D10Device::GetDeviceRemovedReason or ID3D11Device::GetDeviceRemovedReason. |
| DXGI_ERROR_DEVICE_RESET | The device failed due to a badly formed command. This is a run-time issue; the application should destroy and recreate the device. The GPU will not respond to more commands, most likely because some other application submitted invalid commands. The calling application should re-create the device and continue. |
| DXGI_ERROR_DRIVER_INTERNAL_ERROR | The driver encountered a problem and was put into the “device removed” state. An internal issue prevented the driver from carrying out the specified operation. The driver’s state is probably suspect, and the application should not continue. |
| DXGI_ERROR_FRAME_STATISTICS_DISJOINT | An event (such as a power cycle) interrupted the gathering of presentation statistics. Any previous statistics should be considered invalid. |
| DXGI_ERROR_GRAPHICS_VIDPN_SOURCE_IN_USE | For Xbox One: Fullscreen mode could not be achieved, because the specified output was already in use. For desktop: The application attempted to acquire exclusive ownership of an output, but failed because some other application (or device within the application) already acquired ownership. |
| DXGI_ERROR_INVALID_CALL | The application made a call that is invalid. Either the parameters of the call or the state of some object was incorrect. Enable the D3D debug layer in order to see details via debug messages. |
| DXGI_ERROR_MORE_DATA | The buffer supplied by the application is not big enough to hold the requested data. |
| DXGI_ERROR_NAME_ALREADY_EXISTS | The supplied name of a resource in a call to IDXGIResource1::CreateSharedHandle is already associated with some other resource. The application is trying to create a shared handle using a name that is already associated with some other resource. |
| DXGI_ERROR_NONEXCLUSIVE | A global counter resource is in use, and the Direct3D device can’t currently use the counter resource. |
| DXGI_ERROR_NOT_CURRENTLY_AVAILABLE | A resource is not available at the time of the call, but may become available later. |
| DXGI_ERROR_NOT_FOUND | When calling IDXGIObject::GetPrivateData, the GUID passed in is not recognized as one previously passed to IDXGIObject::SetPrivateData or IDXGIObject::SetPrivateDataInterface. When calling IDXGIFactory::EnumAdapters or IDXGIAdapter::EnumOutputs, the enumerated ordinal is out of range. |
| DXGI_ERROR_REMOTE_CLIENT_DISCONNECTED | Reserved. The application’s remote device has been removed due to session disconnect or network disconnect. The application should call IDXGIFactory1::IsCurrent to find out when the remote device becomes available again. |
| DXGI_ERROR_REMOTE_OUTOFMEMORY | Reserved. The device has been removed during a remote session because the remote computer ran out of memory. |
| DXGI_ERROR_RESTRICT_TO_OUTPUT_STALE | The DXGI output (monitor) to which the swap chain content was restricted, has been disconnected or changed. |
| DXGI_ERROR_SESSION_DISCONNECTED | The Remote Desktop Services session is currently disconnected. The output duplication has been turned off because the Windows session ended or was disconnected. This happens when a remote user disconnects, or when “switch user” is used locally. |
| DXGI_ERROR_UNSUPPORTED | The requested functionality is not supported by the device or the driver. The specified device interface or feature level is not supported on this system. |
| DXGI_ERROR_WAIT_TIMEOUT | The time-out interval elapsed before the next frame was available. |
| DXGI_ERROR_WAS_STILL_DRAWING | The GPU was busy at the moment when the call was made, and the call was neither executed nor scheduled. |
| S_OK | The method succeeded without an error. |
You may be interested only in whether the method succeeded or failed. The best way to test whether an HRESULT value indicates success or failure is to pass the value to the one of the following macros, defined in WinError.h:
The HRESULT value for each DXGI_ERROR value is determined from this macro that is defined in DXGItype.h:
#define _FACDXGI 0x87a
#define MAKE_DXGI_HRESULT(code) MAKE_HRESULT(1, _FACDXGI, code)
For example, DXGI_ERROR_INVALID_CALL is defined as 0x887A0001:
#define DXGI_ERROR_INVALID_CALL MAKE_DXGI_HRESULT(1)