///////////////////// // This function is just for quickly // bailing out of your DirectX app when // there's an error. // There's also a few macros like DXTRACE_ERR_MSGBOX // defined in <dxerr.h> but I don't like them #include <dxerr.h> #pragma comment ( lib, "dxerr.lib" ); void exitAppWithErr( HRESULT hr, TCHAR * err ) { TCHAR fullErr[ 1024 ]; wsprintf( fullErr, TEXT("%s.\nDirectX says: \"%s: %s\"." ), err, DXGetErrorString( hr ), DXGetErrorDescription( hr ) ) ; FatalAppExit( 0, fullErr ); }
// EXAMPLE call: exitAppWithErr( hr, TEXT("Problem creating secondary sound buffer") ) ;

Post a Comment