// Extract the error code from an HRESULT
#define CODEFROMHRESULT(hRes) ((hRes) & 0x0000FFFF)
#ifdef _DEBUG
#define ASSERT(x) assert(x)
#else
#define ASSERT(x)
#endif
// Used to keep the compiler from issuing warnings about any unused
// parameters.
#define USE_PARAM(x) (x) = (x)