Changeset 101
- Timestamp:
- Aug 23, 2012, 11:20:02 AM (11 years ago)
- Location:
- trunk/Utilities/ShowHresult
- Files:
-
- 2 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Utilities/ShowHresult/NotifyIconWindow.h
r100 r101 17 17 #include <wincodec.h> // FACILITY_WINCODEC_ERR 18 18 #include <wia_lh.h> // FACILITY_WIA 19 #include <corerror.h> // FACILITY_URT 19 20 #include "rowinhttp.h" 20 21 #include "AboutDialog.h" … … 273 274 return _T(""); 274 275 } 276 static BOOL IsUrtResult(HRESULT nResult, CString* psMessage = NULL) 277 { 278 if(HRESULT_FACILITY(nResult) != FACILITY_URT) 279 return FALSE; 280 psMessage; 281 return !LookupUrtIdentifier(nResult).IsEmpty(); 282 } 283 static CString LookupUrtIdentifier(HRESULT nValue) 284 { 285 static const struct { HRESULT nValue; LPCSTR pszName; } g_pMap[] = 286 { 287 #define A(x) { x, #x }, 288 #include "UrtIdentifier.inc" 289 #undef A 290 }; 291 for(SIZE_T nIndex = 0; nIndex < DIM(g_pMap); nIndex++) 292 if(g_pMap[nIndex].nValue == nValue) 293 return CString(g_pMap[nIndex].pszName); 294 return _T(""); 295 } 275 296 276 297 public: … … 384 405 sTitle = _T("WIA"); 385 406 sIdentifier = LookupWiaIdentifier(nResult); 407 } else if(IsUrtResult(nResult, &sMessage)) 408 { 409 sTitle = _T(".NET"); 410 sIdentifier = LookupUrtIdentifier(nResult); 386 411 } else 387 412 { -
trunk/Utilities/ShowHresult/ShowHresult.vcxproj
r100 r101 299 299 <ClInclude Include="stdafx.h" /> 300 300 <ClInclude Include="targetver.h" /> 301 <None Include="UrtIdentifier.Inc" /> 301 302 <None Include="WiaIdentifier.inc" /> 302 303 <None Include="WicIdentifier.inc"> -
trunk/Utilities/ShowHresult/ShowHresult.vcxproj.filters
r100 r101 87 87 <Filter>Header Files\Include Files</Filter> 88 88 </None> 89 <None Include="UrtIdentifier.Inc"> 90 <Filter>Header Files\Include Files</Filter> 91 </None> 89 92 </ItemGroup> 90 93 <ItemGroup> -
trunk/Utilities/ShowHresult/ShowHresult_i.c
r100 r101 7 7 8 8 /* File created by MIDL compiler version 7.00.0555 */ 9 /* at Thu Aug 23 01:55:1720129 /* at Thu Aug 23 21:13:02 2012 10 10 */ 11 11 /* Compiler settings for ShowHresult.idl: -
trunk/Utilities/ShowHresult/ShowHresult_i.h
r100 r101 5 5 6 6 /* File created by MIDL compiler version 7.00.0555 */ 7 /* at Thu Aug 23 01:55:1720127 /* at Thu Aug 23 21:13:02 2012 8 8 */ 9 9 /* Compiler settings for ShowHresult.idl:
Note: See TracChangeset
for help on using the changeset viewer.