Avionics
Dropship Simulator
dxerr.cpp File Reference
#include "dxerr.h"
#include <stdio.h>
#include <algorithm>
#include <ddraw.h>
#include <d3d9.h>
#include <dsound.h>
#include <dinput.h>
#include <dinputd.h>
#include <d3d10_1.h>
#include <d3d11_1.h>
#include <wincodec.h>
#include <d2derr.h>
#include <dwrite.h>
Include dependency graph for dxerr.cpp:

Go to the source code of this file.

Macros

#define DIRECTINPUT_VERSION   0x800
 
#define XAUDIO2_E_INVALID_CALL   0x88960001
 
#define XAUDIO2_E_XMA_DECODER_ERROR   0x88960002
 
#define XAUDIO2_E_XAPO_CREATION_FAILED   0x88960003
 
#define XAUDIO2_E_DEVICE_INVALIDATED   0x88960004
 
#define XAPO_E_FORMAT_UNSUPPORTED   MAKE_HRESULT(SEVERITY_ERROR, 0x897, 0x01)
 
#define DXUTERR_NODIRECT3D   MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0901)
 
#define DXUTERR_NOCOMPATIBLEDEVICES   MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0902)
 
#define DXUTERR_MEDIANOTFOUND   MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0903)
 
#define DXUTERR_NONZEROREFCOUNT   MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0904)
 
#define DXUTERR_CREATINGDEVICE   MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0905)
 
#define DXUTERR_RESETTINGDEVICE   MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0906)
 
#define DXUTERR_CREATINGDEVICEOBJECTS   MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0907)
 
#define DXUTERR_RESETTINGDEVICEOBJECTS   MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0908)
 
#define DXUTERR_INCORRECTVERSION   MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0909)
 
#define DXUTERR_DEVICEREMOVED   MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x090A)
 
#define BUFFER_SIZE   3000
 
#define CHK_ERR(hrchk, strOut)
 
#define CHK_ERRA(hrchk)
 
#define HRESULT_FROM_WIN32b(x)   ((HRESULT)(x) <= 0 ? ((HRESULT)(x)) : ((HRESULT) (((x) & 0x0000FFFF) | (FACILITY_WIN32 << 16) | 0x80000000)))
 
#define CHK_ERR_WIN32A(hrchk)
 
#define CHK_ERR_WIN32_ONLY(hrchk, strOut)
 
#define CHK_ERRA(hrchk)
 
#define CHK_ERR(hrchk, strOut)
 

Functions

const WCHAR *WINAPI DXGetErrorStringW (_In_ HRESULT hr)
 
void WINAPI DXGetErrorDescriptionW (_In_ HRESULT hr, _Out_cap_(count) WCHAR *desc, _In_ size_t count)
 
HRESULT WINAPI DXTraceW (_In_z_ const WCHAR *strFile, _In_ DWORD dwLine, _In_ HRESULT hr, _In_opt_ const WCHAR *strMsg, _In_ bool bPopMsgBox)
 

Macro Definition Documentation

◆ BUFFER_SIZE

#define BUFFER_SIZE   3000

Definition at line 59 of file dxerr.cpp.

◆ CHK_ERR [1/2]

#define CHK_ERR (   hrchk,
  strOut 
)
Value:
case hrchk: \
return L##strOut;

Definition at line 3454 of file dxerr.cpp.

◆ CHK_ERR [2/2]

#define CHK_ERR (   hrchk,
  strOut 
)
Value:
case hrchk: \
wcscpy_s( desc, count, L##strOut );

Definition at line 3454 of file dxerr.cpp.

◆ CHK_ERR_WIN32_ONLY

#define CHK_ERR_WIN32_ONLY (   hrchk,
  strOut 
)
Value:
case HRESULT_FROM_WIN32b(hrchk): \
return L##strOut;
#define HRESULT_FROM_WIN32b(x)
Definition: dxerr.cpp:72

Definition at line 79 of file dxerr.cpp.

◆ CHK_ERR_WIN32A

#define CHK_ERR_WIN32A (   hrchk)
Value:
case HRESULT_FROM_WIN32b(hrchk): \
case hrchk: \
return L#hrchk;
#define HRESULT_FROM_WIN32b(x)
Definition: dxerr.cpp:72

Definition at line 74 of file dxerr.cpp.

◆ CHK_ERRA [1/2]

#define CHK_ERRA (   hrchk)
Value:
case hrchk: \
return L#hrchk;

Definition at line 3450 of file dxerr.cpp.

◆ CHK_ERRA [2/2]

#define CHK_ERRA (   hrchk)
Value:
case hrchk: \
wcscpy_s( desc, count, L#hrchk );

Definition at line 3450 of file dxerr.cpp.

◆ DIRECTINPUT_VERSION

#define DIRECTINPUT_VERSION   0x800

Definition at line 26 of file dxerr.cpp.

◆ DXUTERR_CREATINGDEVICE

#define DXUTERR_CREATINGDEVICE   MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0905)

Definition at line 51 of file dxerr.cpp.

◆ DXUTERR_CREATINGDEVICEOBJECTS

#define DXUTERR_CREATINGDEVICEOBJECTS   MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0907)

Definition at line 53 of file dxerr.cpp.

◆ DXUTERR_DEVICEREMOVED

#define DXUTERR_DEVICEREMOVED   MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x090A)

Definition at line 56 of file dxerr.cpp.

◆ DXUTERR_INCORRECTVERSION

#define DXUTERR_INCORRECTVERSION   MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0909)

Definition at line 55 of file dxerr.cpp.

◆ DXUTERR_MEDIANOTFOUND

#define DXUTERR_MEDIANOTFOUND   MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0903)

Definition at line 49 of file dxerr.cpp.

◆ DXUTERR_NOCOMPATIBLEDEVICES

#define DXUTERR_NOCOMPATIBLEDEVICES   MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0902)

Definition at line 48 of file dxerr.cpp.

◆ DXUTERR_NODIRECT3D

#define DXUTERR_NODIRECT3D   MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0901)

Definition at line 47 of file dxerr.cpp.

◆ DXUTERR_NONZEROREFCOUNT

#define DXUTERR_NONZEROREFCOUNT   MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0904)

Definition at line 50 of file dxerr.cpp.

◆ DXUTERR_RESETTINGDEVICE

#define DXUTERR_RESETTINGDEVICE   MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0906)

Definition at line 52 of file dxerr.cpp.

◆ DXUTERR_RESETTINGDEVICEOBJECTS

#define DXUTERR_RESETTINGDEVICEOBJECTS   MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0908)

Definition at line 54 of file dxerr.cpp.

◆ HRESULT_FROM_WIN32b

#define HRESULT_FROM_WIN32b (   x)    ((HRESULT)(x) <= 0 ? ((HRESULT)(x)) : ((HRESULT) (((x) & 0x0000FFFF) | (FACILITY_WIN32 << 16) | 0x80000000)))

Definition at line 72 of file dxerr.cpp.

◆ XAPO_E_FORMAT_UNSUPPORTED

#define XAPO_E_FORMAT_UNSUPPORTED   MAKE_HRESULT(SEVERITY_ERROR, 0x897, 0x01)

Definition at line 45 of file dxerr.cpp.

◆ XAUDIO2_E_DEVICE_INVALIDATED

#define XAUDIO2_E_DEVICE_INVALIDATED   0x88960004

Definition at line 43 of file dxerr.cpp.

◆ XAUDIO2_E_INVALID_CALL

#define XAUDIO2_E_INVALID_CALL   0x88960001

Definition at line 40 of file dxerr.cpp.

◆ XAUDIO2_E_XAPO_CREATION_FAILED

#define XAUDIO2_E_XAPO_CREATION_FAILED   0x88960003

Definition at line 42 of file dxerr.cpp.

◆ XAUDIO2_E_XMA_DECODER_ERROR

#define XAUDIO2_E_XMA_DECODER_ERROR   0x88960002

Definition at line 41 of file dxerr.cpp.

Function Documentation

◆ DXGetErrorDescriptionW()

void WINAPI DXGetErrorDescriptionW ( _In_ HRESULT  hr,
_Out_cap_(count) WCHAR *  desc,
_In_ size_t  count 
)

Definition at line 3460 of file dxerr.cpp.

◆ DXGetErrorStringW()

const WCHAR* WINAPI DXGetErrorStringW ( _In_ HRESULT  hr)

Definition at line 84 of file dxerr.cpp.

Here is the caller graph for this function:

◆ DXTraceW()

HRESULT WINAPI DXTraceW ( _In_z_ const WCHAR *  strFile,
_In_ DWORD  dwLine,
_In_ HRESULT  hr,
_In_opt_ const WCHAR *  strMsg,
_In_ bool  bPopMsgBox 
)

Definition at line 3911 of file dxerr.cpp.

Here is the call graph for this function: