Changeset 167
- Timestamp:
- Jan 29, 2013, 5:26:02 AM (11 years ago)
- Location:
- trunk/Utilities/ShowHresult
- Files:
-
- 1 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Utilities/ShowHresult/NotifyIconWindow.h
r153 r167 8 8 9 9 #include <vfwmsgs.h> 10 #include <vfw.h> // FACILITY_ITF, AVIERR_ 10 11 #include <asferr.h> // FACILITY_NS 11 12 #include <nserror.h> // FACILITY_NS … … 477 478 #define A(x) { x, #x }, 478 479 #include "SlIdentifier.inc" 480 #undef A 481 }; 482 for(SIZE_T nIndex = 0; nIndex < DIM(g_pMap); nIndex++) 483 if(g_pMap[nIndex].nValue == nValue) 484 { 485 sIdentifier = CString(g_pMap[nIndex].pszName); 486 return TRUE; 487 } 488 return FALSE; 489 } 490 static BOOL IsAviResult(HRESULT nResult, CString* psMessage = NULL, CString* psIdentifier = NULL) 491 { 492 if(HRESULT_FACILITY(nResult) != FACILITY_ITF && HRESULT_CODE(nResult) - (0x4000 + 100) < 100) 493 return FALSE; 494 psMessage; 495 CString sIdentifier; 496 if(!LookupAviIdentifier(nResult, sIdentifier)) 497 return FALSE; 498 if(psIdentifier) 499 *psIdentifier = sIdentifier; 500 return TRUE; 501 } 502 static BOOL LookupAviIdentifier(HRESULT nValue, CString& sIdentifier) 503 { 504 static const struct { HRESULT nValue; LPCSTR pszName; } g_pMap[] = 505 { 506 #define A(x) { x, #x }, 507 #include "AviIdentifier.inc" 479 508 #undef A 480 509 }; … … 665 694 else if(IsSlResult(nResult, &sMessage, &sIdentifier) || LookupSlIdentifier(nResult, sIdentifier)) 666 695 sTitle = _T("Software Licensing"); 696 else if(IsAviResult(nResult, &sMessage, &sIdentifier) || LookupAviIdentifier(nResult, sIdentifier)) 697 sTitle = _T("AVI"); 667 698 else 668 699 { … … 725 756 //Process(AtlFormatString(_T("0x%x"), HRESULT_FROM_WIN32(WSAEADDRINUSE))); // WSAEADDRINUSE 726 757 //Process(AtlFormatString(_T("0x%x"), HRESULT_FROM_WIN32(ERROR_WINHTTP_AUTODETECTION_FAILED))); // ERROR_WINHTTP_AUTODETECTION_FAILED 727 Process(_T("0x80 131029L"));758 Process(_T("0x8004406a")); 728 759 //Process(_T("-2147312566")); 729 760 #endif // defined(_DEBUG) -
trunk/Utilities/ShowHresult/ShowHresult.vcxproj
r153 r167 294 294 <FileType>CppHeader</FileType> 295 295 </None> 296 <None Include="AviIdentifier.inc"> 297 <FileType>CppHeader</FileType> 298 </None> 296 299 <None Include="P2pIdentifier.inc"> 297 300 <FileType>CppHeader</FileType> … … 306 309 <ClInclude Include="Resource.h" /> 307 310 <ClInclude Include="ShowHresult_i.h" /> 308 <ClInclude Include="SlIdentifier.inc" /> 311 <ClInclude Include="SlIdentifier.inc"> 312 <FileType>CppHeader</FileType> 313 </ClInclude> 309 314 <ClInclude Include="stdafx.h" /> 310 315 <ClInclude Include="targetver.h" /> -
trunk/Utilities/ShowHresult/ShowHresult.vcxproj.filters
r153 r167 104 104 <Filter>Header Files\Include Files</Filter> 105 105 </None> 106 <None Include="AviIdentifier.inc"> 107 <Filter>Header Files\Include Files</Filter> 108 </None> 106 109 </ItemGroup> 107 110 <ItemGroup> -
trunk/Utilities/ShowHresult/ShowHresult_i.c
r153 r167 7 7 8 8 /* File created by MIDL compiler version 7.00.0555 */ 9 /* at Tue Dec 04 12:57:03 20129 /* at Tue Jan 29 15:23:58 2013 10 10 */ 11 11 /* Compiler settings for ShowHresult.idl: -
trunk/Utilities/ShowHresult/ShowHresult_i.h
r153 r167 5 5 6 6 /* File created by MIDL compiler version 7.00.0555 */ 7 /* at Tue Dec 04 12:57:03 20127 /* at Tue Jan 29 15:23:58 2013 8 8 */ 9 9 /* Compiler settings for ShowHresult.idl:
Note: See TracChangeset
for help on using the changeset viewer.