Changeset 441 for trunk/DirectShowSpy/FilterGraphList.h
- Timestamp:
- May 18, 2015, 10:11:11 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/DirectShowSpy/FilterGraphList.h
r432 r441 249 249 return ((CListPropertyPage*) nParameter)->SortGraphListViewItems(nItemParameter1, nItemParameter2); 250 250 } 251 VOID Refresh()252 { 253 CRoMapT<CStringW, CItem> ItemMap;254 #pragma region Enumerate251 static VOID EnumerateItems(IRunningObjectTable* pRunningObjectTable, CRoMapT<CStringW, CItem>& ItemMap, const LONG* pnProcessIdentifier = NULL) 252 { 253 _A(pRunningObjectTable); 254 _A(ItemMap.IsEmpty()); 255 255 _ATLTRY 256 256 { 257 LONG nProcessIdentifier;258 const BOOL bProcessIdentifierAvailable = m_PropertySheet.m_Options.TryGetLongValue(_T("FilterGraphListPropertySheet.ProcessIdentifier"), nProcessIdentifier);259 if(!m_pRunningObjectTable)260 __C(GetRunningObjectTable(0, &m_pRunningObjectTable));261 257 CComPtr<IEnumMoniker> pEnumMoniker; 262 __C( m_pRunningObjectTable->EnumRunning(&pEnumMoniker));258 __C(pRunningObjectTable->EnumRunning(&pEnumMoniker)); 263 259 CComPtr<IMalloc> pMalloc; 264 260 __C(CoGetMalloc(1, &pMalloc)); … … 288 284 Item.m_sTime = CString(MatchContext.GetMatchString(3)); 289 285 Item.m_sTime.Replace(_T("-"), _T(":")); 290 if( bProcessIdentifierAvailable && Item.m_nProcessIdentifier != (DWORD)nProcessIdentifier)286 if(pnProcessIdentifier && Item.m_nProcessIdentifier != (DWORD) *pnProcessIdentifier) 291 287 continue; // Skip 292 288 _W(ItemMap.SetAt(sDisplayName, Item) >= 0); … … 303 299 _Z_EXCEPTION(); 304 300 } 305 #pragma endregion 301 } 302 VOID Refresh() 303 { 304 if(!m_pRunningObjectTable) 305 __C(GetRunningObjectTable(0, &m_pRunningObjectTable)); 306 LONG nProcessIdentifier; 307 const BOOL bProcessIdentifierAvailable = m_PropertySheet.m_Options.TryGetLongValue(_T("FilterGraphListPropertySheet.ProcessIdentifier"), nProcessIdentifier); 308 CRoMapT<CStringW, CItem> ItemMap; 309 EnumerateItems(m_pRunningObjectTable, ItemMap, bProcessIdentifierAvailable ? &nProcessIdentifier : NULL); 306 310 CWindowRedraw GraphListViewRedraw(m_GraphListView); 307 311 BOOL bSortNeeded = FALSE;
Note: See TracChangeset
for help on using the changeset viewer.