Changeset 146 for trunk/Utilities/ShowHresult/NotifyIconWindow.h
- Timestamp:
- Nov 18, 2012, 9:35:14 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Utilities/ShowHresult/NotifyIconWindow.h
r136 r146 19 19 #include <wia_lh.h> // FACILITY_WIA 20 20 #include <corerror.h> // FACILITY_URT 21 #include <audioclient.h> // FACILITY_AUDCLNT 21 22 #include "rowinhttp.h" 22 23 #include "AboutDialog.h" … … 149 150 #define A(x) { x, #x }, 150 151 #include "MfIdentifier.inc" 152 #undef A 153 }; 154 for(SIZE_T nIndex = 0; nIndex < DIM(g_pMap); nIndex++) 155 if(g_pMap[nIndex].nValue == nValue) 156 { 157 sIdentifier = CString(g_pMap[nIndex].pszName); 158 return TRUE; 159 } 160 return FALSE; 161 } 162 static BOOL IsAudioClientResult(HRESULT nResult, CString* psMessage = NULL, CString* psIdentifier = NULL) 163 { 164 if(HRESULT_FACILITY(nResult) != FACILITY_AUDCLNT) 165 return FALSE; 166 psMessage; 167 CString sIdentifier; 168 if(!LookupAudioClientIdentifier(nResult, sIdentifier)) 169 return FALSE; 170 if(psIdentifier) 171 *psIdentifier = sIdentifier; 172 return TRUE; 173 } 174 static BOOL LookupAudioClientIdentifier(HRESULT nValue, CString& sIdentifier) 175 { 176 static const struct { HRESULT nValue; LPCSTR pszName; } g_pMap[] = 177 { 178 #define A(x) { x, #x }, 179 #include "AudioClientIdentifier.inc" 151 180 #undef A 152 181 }; … … 524 553 LookupMfIdentifier(nResult, sIdentifier); 525 554 sTitle = _T("Media Foundation"); 526 } 555 } else if(IsAudioClientResult(nResult, &sMessage, &sIdentifier) || LookupAudioClientIdentifier(nResult, sIdentifier)) 556 sTitle = _T("Audio Client"); 527 557 #pragma region Obsolete? 528 558 // NOTE: These are perhaps useless in Windows 7, but I am under impression they are helpful in earlier systems
Note: See TracChangeset
for help on using the changeset viewer.