Files
OpenRA/BluntDx/Utilities.h
chrisf 206df3514e lets do this properly.
git-svn-id: svn://svn.ijw.co.nz/svn/OpenRa@1144 993157c7-ee19-0410-b2c4-bb4e9862e678
2007-07-10 02:24:10 +00:00

15 lines
290 B
C++

#pragma once
#define safe_release(x) if(x) { (x)->Release(); x = NULL; }
namespace BluntDirectX
{
ref class ThrowHelper
{
public:
static void Hr( HRESULT hr )
{
throw gcnew InvalidOperationException( String::Format("COM error in DirectX, hr={0}", hr) );
}
};
}