fprintf(stderr,"; local free of system message failed with last error %I32u",localFreeLastError);
fprintf(stderr,"\n");
#ifdef tableDebugStop
DebugBreak();
#endif
SetLastError(le);
// a function does not have to set a last error
// if the last error we get is actually 0, then HRESULT_FROM_WIN32(0) will return S_OK (0 cast to an HRESULT, since 0 <= 0), which we don't want
// prevent this by returning E_FAIL, so the rest of the Table code doesn't barge onward
if(le==0)
returnE_FAIL;
returnHRESULT_FROM_WIN32(le);
}
HRESULTlogHRESULT(constchar*context,HRESULThr)
{
WCHAR*msg;
BOOLparenthesize=FALSE;
BOOLlocalFreeFailed=FALSE;
DWORDlocalFreeLastError;
fprintf(stderr,"%s: ",context);
// this isn't technically documented, but everyone does it, including Microsoft (see the implementation of _com_error::ErrorMessage() in a copy of comdef.h that comes with the Windows DDK)