Changeset 151 for trunk/Utilities/ShowHresult/NotifyIconWindow.h
- Timestamp:
- Nov 26, 2012, 4:00:51 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Utilities/ShowHresult/NotifyIconWindow.h
r146 r151 20 20 #include <corerror.h> // FACILITY_URT 21 21 #include <audioclient.h> // FACILITY_AUDCLNT 22 #include <p2p.h> // FACILITY_P2P 23 24 #include <adserr.h> 25 #include <azroles.h> 26 #include <callobj.h> 27 #include <cryptxml.h> 28 #include <functiondiscoveryerror.h> 29 #include <infotech.h> 30 #include <naperror.h> 31 #include <pstore.h> 32 #include <sherrors.h> 33 #include <ShObjIdl.h> 34 #include <SubsMgr.h> 35 #include <UrlMon.h> 36 #include <wcmerrors.h> 37 22 38 #include "rowinhttp.h" 23 39 #include "AboutDialog.h" … … 400 416 #define A(x) { x, #x }, 401 417 #include "UrtIdentifier.inc" 418 #undef A 419 }; 420 for(SIZE_T nIndex = 0; nIndex < DIM(g_pMap); nIndex++) 421 if(g_pMap[nIndex].nValue == nValue) 422 { 423 sIdentifier = CString(g_pMap[nIndex].pszName); 424 return TRUE; 425 } 426 return FALSE; 427 } 428 static BOOL IsP2pResult(HRESULT nResult, CString* psMessage = NULL, CString* psIdentifier = NULL) 429 { 430 if(HRESULT_FACILITY(nResult) != FACILITY_P2P) 431 return FALSE; 432 psMessage; 433 CString sIdentifier; 434 if(!LookupP2pIdentifier(nResult, sIdentifier)) 435 return FALSE; 436 if(psIdentifier) 437 *psIdentifier = sIdentifier; 438 return TRUE; 439 } 440 static BOOL LookupP2pIdentifier(HRESULT nValue, CString& sIdentifier) 441 { 442 static const struct { HRESULT nValue; LPCSTR pszName; } g_pMap[] = 443 { 444 #define A(x) { x, #x }, 445 #include "P2pIdentifier.inc" 402 446 #undef A 403 447 }; … … 584 628 else if(IsUrtResult(nResult, &sMessage, &sIdentifier) || LookupUrtIdentifier(nResult, sIdentifier)) 585 629 sTitle = _T(".NET"); 630 else if(IsP2pResult(nResult, &sMessage, &sIdentifier) || LookupP2pIdentifier(nResult, sIdentifier)) 631 sTitle = _T("P2P"); 586 632 else 587 633 {
Note: See TracChangeset
for help on using the changeset viewer.