Ignore:
Timestamp:
Oct 11, 2012, 1:21:24 PM (10 years ago)
Author:
roman
Message:

Win32 facility priority for well known codes (might be reused in other "families" of codes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Utilities/ShowHresult/NotifyIconWindow.h

    r129 r131  
    525525                        sTitle = _T("Media Foundation");
    526526                }
    527                 ////////////////////////////////////////////////////
     527                #pragma region Obsolete?
    528528                // NOTE: These are perhaps useless in Windows 7, but I am under impression they are helpful in earlier systems
    529529                else if(IsWs2Result(nResult, &sMessage))
     
    533533                else if(IsWinInetResult(nResult, &sMessage))
    534534                        sTitle = _T("WinInet");
    535                 ////////////////////////////////////////////////////
     535                #pragma endregion
     536                #pragma region Win32 Priority
     537                else if(HRESULT_SEVERITY(nResult) == SEVERITY_ERROR && HRESULT_FACILITY(nResult) == FACILITY_WIN32 && (UINT) HRESULT_CODE(nResult) < 300)
     538                {
     539                        sMessage = AtlFormatSystemMessage(nResult);
     540                        if(!LookupSystemIdentifier(nResult, sIdentifier))
     541                                 LookupHresultSystemIdentifier(nResult, sIdentifier);
     542                        if(!sMessage.IsEmpty() || !sIdentifier.IsEmpty())
     543                                sTitle = _T("System");
     544                }
     545                #pragma endregion
    536546                else if(IsD3dResult(nResult, &sMessage, &sIdentifier) || LookupD3dIdentifier(nResult, sIdentifier))
    537547                        sTitle = _T("DirectDraw/Direct3D");
Note: See TracChangeset for help on using the changeset viewer.