Skip navigation

///////////////////// // 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") ) ;
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: