C++ Game Framework  2013-06-04
CGF is a DirectX 11 game framework, built in C++ and DirectX 11. This is used to contain many to the DirectX functionality and wrap them into a framework to make game development easier.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
dxerr.cpp File Reference
#include "dxerr.h"
#include <stdio.h>
#include <ddraw.h>
#include <d3d9.h>
#include <d3d10_1.h>
#include <d3d11.h>
#include <wincodec.h>
#include <d2d1.h>
#include <dwrite.h>
#include <dsound.h>
#include <dinput.h>
#include <dinputd.h>

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

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

Function Documentation

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