Changeset 265 for trunk/DirectShowSpy
- Timestamp:
- Feb 1, 2014, 11:04:13 AM (10 years ago)
- Location:
- trunk/DirectShowSpy
- Files:
-
- 1 added
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/DirectShowSpy
- Property svn:ignore
-
old new 5 5 *.aps 6 6 *.sdf 7 *.opensdf
-
- Property svn:ignore
-
trunk/DirectShowSpy/DirectShowSpy.idl
r249 r265 159 159 [default] interface IFilterGraphHelper; 160 160 }; 161 [ 162 object, 163 uuid(E267813C-8F29-4D69-A776-CD462494FCE4), 164 nonextensible, 165 helpstring("IRunPropertyBagAware Interface"), 166 pointer_default(unique) 167 ] 168 interface IRunPropertyBagAware : IDispatch 169 { 170 [propget, id(DISPID_VALUE)] HRESULT Value([out, retval] IUnknown** ppPropertyBagUnknown); 171 }; 172 [ 173 uuid(76127943-D22E-4C4E-9D9B-173C224D0EE4), 174 helpstring("RunPropertyBagPropertyPage Class") 175 ] 176 coclass RunPropertyBagPropertyPage 177 { 178 [default] interface IUnknown; //IPropertyPage; 179 }; 161 180 }; -
trunk/DirectShowSpy/DirectShowSpy.rc
r261 r265 42 42 "#include ""winres.h""\r\n" 43 43 "#include ""atlres.h""\r\n" 44 "#include ""rores.rc""\r\0" 44 "#include ""rores.rc""\r\n" 45 "\0" 45 46 END 46 47 … … 59 60 60 61 VS_VERSION_INFO VERSIONINFO 61 FILEVERSION 1, 0, 0, 13 1962 FILEVERSION 1, 0, 0, 1377 62 63 PRODUCTVERSION 1,0,0,1 63 64 FILEFLAGSMASK 0x3fL … … 78 79 VALUE "CompanyName", "Roman Ryltsov" 79 80 VALUE "FileDescription", "Alax.Info DirectShow Spy Module" 80 VALUE "FileVersion", "1, 0, 0, 13 19\0"81 VALUE "FileVersion", "1, 0, 0, 1377\0" 81 82 VALUE "InternalName", "DirectShowSpy.dll" 82 83 VALUE "LegalCopyright", "Copyright © Alax.Info, Roman Ryltsov, 2008-2014" … … 105 106 IDR_SYSTEMDEVICEENUMERATORSPY REGISTRY "GenericClass.rgs" 106 107 IDR_FILTERGRAPHHELPER REGISTRY "GenericClass.rgs" 108 IDR_GENERIC_RUNPROPERTYBAGPROPERTYPAGE REGISTRY "GenericPropertyPage.rgs" 107 109 108 110 ///////////////////////////////////////////////////////////////////////////// … … 310 312 END 311 313 314 IDD_GENERIC_RUNPROPERTYBAG DIALOGEX 0, 0, 227, 200 315 STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD 316 FONT 8, "MS Shell Dlg", 400, 0, 0x0 317 BEGIN 318 LTEXT "Please find below listed runtime properties managed and provided by the object.",IDC_GENERIC_RUNPROPERTYBAG_INTRODUCTION,6,6,216,18 319 EDITTEXT IDC_GENERIC_RUNPROPERTYBAG_TEXT,6,30,216,144,ES_MULTILINE | ES_AUTOVSCROLL | ES_AUTOHSCROLL | ES_READONLY | WS_VSCROLL | WS_HSCROLL 320 PUSHBUTTON "&Refresh",IDC_GENERIC_RUNPROPERTYBAG_REFRESH,6,180,50,14 321 END 322 312 323 313 324 ///////////////////////////////////////////////////////////////////////////// … … 347 358 RIGHTMARGIN, 366 348 359 BOTTOMMARGIN, 248 360 END 361 362 IDD_GENERIC_RUNPROPERTYBAG, DIALOG 363 BEGIN 349 364 END 350 365 END … … 426 441 STRINGTABLE 427 442 BEGIN 443 IDR_GENERIC_RUNPROPERTYBAGPROPERTYPAGE 444 "\n\nAlax.Info DirectShow Spy Runtime Property Bag Property Page\n" 445 END 446 447 STRINGTABLE 448 BEGIN 449 IDD_GENERIC_RUNPROPERTYBAG "Runtime" 450 END 451 452 STRINGTABLE 453 BEGIN 428 454 IDR_FILTERGRAPHHELPER "AlaxInfo.DirectShowSpy.FilterGraphHelper\nAlaxInfo.DirectShowSpy.FilterGraphHelper.1\nAlax.Info DirectShow Filter Graph Helper\n" 429 455 END -
trunk/DirectShowSpy/DirectShowSpy.vcxproj
r256 r265 458 458 <None Include="FilterMapperSpy.rgs" /> 459 459 <None Include="GenericClass.rgs" /> 460 <None Include="GenericPropertyPage.rgs" /> 460 461 </ItemGroup> 461 462 <ItemGroup> -
trunk/DirectShowSpy/DirectShowSpy.vcxproj.filters
r247 r265 59 59 </None> 60 60 <None Include="..\..\Repository-Private\Utilities\EmailTools\_Bin\Win32\Release\EmailTools\EmailTools.tlb"> 61 <Filter>Resource Files</Filter> 62 </None> 63 <None Include="GenericPropertyPage.rgs"> 61 64 <Filter>Resource Files</Filter> 62 65 </None> -
trunk/DirectShowSpy/DirectShowSpy_i.c
r258 r265 7 7 8 8 /* File created by MIDL compiler version 7.00.0555 */ 9 /* at Sat Jan 18 13:18:1720149 /* at Sat Feb 01 17:41:18 2014 10 10 */ 11 11 /* Compiler settings for DirectShowSpy.idl: … … 106 106 MIDL_DEFINE_GUID(CLSID, CLSID_FilterGraphHelper,0x5A9A684C,0xA891,0x4032,0x8D,0x31,0xFF,0x6E,0xAB,0x5A,0x0C,0x1E); 107 107 108 109 MIDL_DEFINE_GUID(IID, IID_IRunPropertyBagAware,0xE267813C,0x8F29,0x4D69,0xA7,0x76,0xCD,0x46,0x24,0x94,0xFC,0xE4); 110 111 112 MIDL_DEFINE_GUID(CLSID, CLSID_RunPropertyBagPropertyPage,0x76127943,0xD22E,0x4C4E,0x9D,0x9B,0x17,0x3C,0x22,0x4D,0x0E,0xE4); 113 108 114 #undef MIDL_DEFINE_GUID 109 115 -
trunk/DirectShowSpy/DirectShowSpy_i.h
r258 r265 5 5 6 6 /* File created by MIDL compiler version 7.00.0555 */ 7 /* at Sat Jan 18 13:18:1720147 /* at Sat Feb 01 17:41:18 2014 8 8 */ 9 9 /* Compiler settings for DirectShowSpy.idl: … … 148 148 149 149 150 #ifndef __IRunPropertyBagAware_FWD_DEFINED__ 151 #define __IRunPropertyBagAware_FWD_DEFINED__ 152 typedef interface IRunPropertyBagAware IRunPropertyBagAware; 153 #endif /* __IRunPropertyBagAware_FWD_DEFINED__ */ 154 155 156 #ifndef __RunPropertyBagPropertyPage_FWD_DEFINED__ 157 #define __RunPropertyBagPropertyPage_FWD_DEFINED__ 158 159 #ifdef __cplusplus 160 typedef class RunPropertyBagPropertyPage RunPropertyBagPropertyPage; 161 #else 162 typedef struct RunPropertyBagPropertyPage RunPropertyBagPropertyPage; 163 #endif /* __cplusplus */ 164 165 #endif /* __RunPropertyBagPropertyPage_FWD_DEFINED__ */ 166 167 150 168 /* header files for imported files */ 151 169 #include "oaidl.h" … … 1201 1219 FilterGraphHelper; 1202 1220 #endif 1221 1222 #ifndef __IRunPropertyBagAware_INTERFACE_DEFINED__ 1223 #define __IRunPropertyBagAware_INTERFACE_DEFINED__ 1224 1225 /* interface IRunPropertyBagAware */ 1226 /* [unique][helpstring][nonextensible][uuid][object] */ 1227 1228 1229 EXTERN_C const IID IID_IRunPropertyBagAware; 1230 1231 #if defined(__cplusplus) && !defined(CINTERFACE) 1232 1233 MIDL_INTERFACE("E267813C-8F29-4D69-A776-CD462494FCE4") 1234 IRunPropertyBagAware : public IDispatch 1235 { 1236 public: 1237 virtual /* [id][propget] */ HRESULT STDMETHODCALLTYPE get_Value( 1238 /* [retval][out] */ IUnknown **ppPropertyBagUnknown) = 0; 1239 1240 }; 1241 1242 #else /* C style interface */ 1243 1244 typedef struct IRunPropertyBagAwareVtbl 1245 { 1246 BEGIN_INTERFACE 1247 1248 HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 1249 IRunPropertyBagAware * This, 1250 /* [in] */ REFIID riid, 1251 /* [annotation][iid_is][out] */ 1252 __RPC__deref_out void **ppvObject); 1253 1254 ULONG ( STDMETHODCALLTYPE *AddRef )( 1255 IRunPropertyBagAware * This); 1256 1257 ULONG ( STDMETHODCALLTYPE *Release )( 1258 IRunPropertyBagAware * This); 1259 1260 HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( 1261 IRunPropertyBagAware * This, 1262 /* [out] */ UINT *pctinfo); 1263 1264 HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( 1265 IRunPropertyBagAware * This, 1266 /* [in] */ UINT iTInfo, 1267 /* [in] */ LCID lcid, 1268 /* [out] */ ITypeInfo **ppTInfo); 1269 1270 HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( 1271 IRunPropertyBagAware * This, 1272 /* [in] */ REFIID riid, 1273 /* [size_is][in] */ LPOLESTR *rgszNames, 1274 /* [range][in] */ UINT cNames, 1275 /* [in] */ LCID lcid, 1276 /* [size_is][out] */ DISPID *rgDispId); 1277 1278 /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( 1279 IRunPropertyBagAware * This, 1280 /* [in] */ DISPID dispIdMember, 1281 /* [in] */ REFIID riid, 1282 /* [in] */ LCID lcid, 1283 /* [in] */ WORD wFlags, 1284 /* [out][in] */ DISPPARAMS *pDispParams, 1285 /* [out] */ VARIANT *pVarResult, 1286 /* [out] */ EXCEPINFO *pExcepInfo, 1287 /* [out] */ UINT *puArgErr); 1288 1289 /* [id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Value )( 1290 IRunPropertyBagAware * This, 1291 /* [retval][out] */ IUnknown **ppPropertyBagUnknown); 1292 1293 END_INTERFACE 1294 } IRunPropertyBagAwareVtbl; 1295 1296 interface IRunPropertyBagAware 1297 { 1298 CONST_VTBL struct IRunPropertyBagAwareVtbl *lpVtbl; 1299 }; 1300 1301 1302 1303 #ifdef COBJMACROS 1304 1305 1306 #define IRunPropertyBagAware_QueryInterface(This,riid,ppvObject) \ 1307 ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 1308 1309 #define IRunPropertyBagAware_AddRef(This) \ 1310 ( (This)->lpVtbl -> AddRef(This) ) 1311 1312 #define IRunPropertyBagAware_Release(This) \ 1313 ( (This)->lpVtbl -> Release(This) ) 1314 1315 1316 #define IRunPropertyBagAware_GetTypeInfoCount(This,pctinfo) \ 1317 ( (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) ) 1318 1319 #define IRunPropertyBagAware_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ 1320 ( (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) ) 1321 1322 #define IRunPropertyBagAware_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ 1323 ( (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) ) 1324 1325 #define IRunPropertyBagAware_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ 1326 ( (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) ) 1327 1328 1329 #define IRunPropertyBagAware_get_Value(This,ppPropertyBagUnknown) \ 1330 ( (This)->lpVtbl -> get_Value(This,ppPropertyBagUnknown) ) 1331 1332 #endif /* COBJMACROS */ 1333 1334 1335 #endif /* C style interface */ 1336 1337 1338 1339 1340 #endif /* __IRunPropertyBagAware_INTERFACE_DEFINED__ */ 1341 1342 1343 EXTERN_C const CLSID CLSID_RunPropertyBagPropertyPage; 1344 1345 #ifdef __cplusplus 1346 1347 class DECLSPEC_UUID("76127943-D22E-4C4E-9D9B-173C224D0EE4") 1348 RunPropertyBagPropertyPage; 1349 #endif 1203 1350 #endif /* __AlaxInfoDirectShowSpy_LIBRARY_DEFINED__ */ 1204 1351 -
trunk/DirectShowSpy/DirectShowSpy_p.c
r258 r265 5 5 6 6 /* File created by MIDL compiler version 7.00.0555 */ 7 /* at Sat Jan 18 13:18:1720147 /* at Sat Feb 01 17:41:18 2014 8 8 */ 9 9 /* Compiler settings for DirectShowSpy.idl: -
trunk/DirectShowSpy/FilterGraphHelper.h
r261 r265 20 20 HRESULT FilterGraphHelper_OpenGraphStudioNext(LONG nParentWindowHandle, LPCWSTR pszMonikerDisplayName, VARIANT_BOOL* pbResult); 21 21 HRESULT FilterGraphHelper_OpenGraphEdit(LONG nParentWindowHandle, LPCWSTR pszMonikerDisplayName, VARIANT_BOOL* pbResult); 22 23 //////////////////////////////////////////////////////////// 24 // CFilterGraphHelper 25 26 //////////////////////////////////////////////////////////// 27 // CRunPropertyBagPropertyPage 28 29 class ATL_NO_VTABLE CRunPropertyBagPropertyPage : 30 public CComObjectRootEx<CComSingleThreadModel>, 31 public CComCoClass<CRunPropertyBagPropertyPage, &__uuidof(RunPropertyBagPropertyPage)>, 32 public COlePropertyPageT<CRunPropertyBagPropertyPage>, 33 public CDialogResize<CRunPropertyBagPropertyPage> 34 { 35 public: 36 enum { IDR = IDR_GENERIC_RUNPROPERTYBAGPROPERTYPAGE }; 37 enum { IDD = IDD_GENERIC_RUNPROPERTYBAG }; 38 39 BEGIN_COM_MAP(CRunPropertyBagPropertyPage) 40 COM_INTERFACE_ENTRY(IPropertyPage2) 41 COM_INTERFACE_ENTRY(IPropertyPage) 42 END_COM_MAP() 43 44 BEGIN_MSG_MAP_EX(CRunPropertyBagPropertyPage) 45 CHAIN_MSG_MAP(COlePropertyPage) 46 CHAIN_MSG_MAP(CDialogResize<CRunPropertyBagPropertyPage>) 47 MSG_WM_INITDIALOG(OnInitDialog) 48 MSG_WM_DESTROY(OnDestroy) 49 COMMAND_ID_HANDLER_EX(IDC_GENERIC_RUNPROPERTYBAG_REFRESH, OnRefresh) 50 REFLECT_NOTIFICATIONS() 51 END_MSG_MAP() 52 53 BEGIN_DLGRESIZE_MAP(CRunPropertyBagPropertyPage) 54 DLGRESIZE_CONTROL(IDC_GENERIC_RUNPROPERTYBAG_INTRODUCTION, DLSZ_SIZE_X) 55 DLGRESIZE_CONTROL(IDC_GENERIC_RUNPROPERTYBAG_TEXT, DLSZ_SIZE_X | DLSZ_SIZE_Y) 56 DLGRESIZE_CONTROL(IDC_GENERIC_RUNPROPERTYBAG_REFRESH, DLSZ_MOVE_Y) 57 END_DLGRESIZE_MAP() 58 59 public: 60 61 //////////////////////////////////////////////////////// 62 // CSimpleSortTraitsT 63 64 class CNameSortTraits : 65 public CSimpleSortTraitsT<CString> 66 { 67 public: 68 // CNameSortTraits 69 static INT_PTR CompareElements(const CString& sElementA, const CString& sElementB, PARAMETERARGUMENT Parameter) 70 { 71 return _tcsicmp(sElementA, sElementB); 72 } 73 }; 74 75 private: 76 BOOL m_bActivating; 77 CRoEdit m_TextEdit; 78 CFont m_TextFont; 79 CRoMapT<INT_PTR, BOOL> m_ChangeMap; 80 81 public: 82 // CRunPropertyBagPropertyPage 83 static CString GetObjectFriendlyName() 84 { 85 return _StringHelper::GetLine(IDR, 2); 86 } 87 static HRESULT WINAPI UpdateRegistry(BOOL bRegister) 88 { 89 _Z2(atlTraceRegistrar, 2, _T("bRegister %d\n"), bRegister); 90 return DefaultUpdateRegistry(bRegister); 91 } 92 CRunPropertyBagPropertyPage() 93 { 94 _Z4(atlTraceRefcount, 4, _T("this 0x%p\n"), this); 95 } 96 ~CRunPropertyBagPropertyPage() 97 { 98 _Z4(atlTraceRefcount, 4, _T("this 0x%p\n"), this); 99 } 100 VOID UpdateControls() 101 { 102 } 103 static CString GetText(IPropertyBag2* pPropertyBag2) 104 { 105 _A(pPropertyBag2); 106 CString sText; 107 ULONG nPropertyCount = 0; 108 __C(pPropertyBag2->CountProperties(&nPropertyCount)); 109 _Z4(atlTraceGeneral, 4, _T("nPropertyCount %d\n"), nPropertyCount); 110 if(nPropertyCount) 111 { 112 CTempBufferT<PROPBAG2> pPropBags(nPropertyCount); 113 ZeroMemory((PROPBAG2*) pPropBags, nPropertyCount * sizeof *pPropBags); 114 ULONG nPropBagCount = 0; 115 __C(pPropertyBag2->GetPropertyInfo(0, nPropertyCount, pPropBags, &nPropBagCount)); 116 _Z4(atlTraceGeneral, 4, _T("nPropBagCount %d\n"), nPropBagCount); 117 CRoListT<CComHeapPtr<OLECHAR>> NameList; 118 for(ULONG nIndex = 0; nIndex < nPropBagCount; nIndex++) 119 NameList.GetAt(NameList.AddTail()).Attach(pPropBags[nIndex].pstrName); 120 CRoArrayT<CComVariantArray> ValueArray; 121 __D(ValueArray.SetCount(nPropBagCount), E_OUTOFMEMORY); 122 CTempBufferT<HRESULT> pnResults(nPropBagCount); 123 __C(pPropertyBag2->Read(nPropBagCount, pPropBags, NULL, ValueArray.GetData(), pnResults)); 124 CRoMapT<CString, CComVariantArray> Map; 125 CRoArrayT<CString> NameArray; 126 for(ULONG nIndex = 0; nIndex < nPropBagCount; nIndex++) 127 if(SUCCEEDED(pnResults[nIndex])) 128 { 129 CString sName(pPropBags[nIndex].pstrName); 130 _Z4(atlTraceGeneral, 4, _T("sName \"%s\"\n"), sName); 131 NameArray.Add(sName); 132 _W(Map.SetAt(sName, ValueArray[nIndex])); 133 } 134 _SortHelper::QuickSort<CNameSortTraits>(NameArray); 135 for(SIZE_T nIndex = 0; nIndex < NameArray.GetCount(); nIndex++) 136 { 137 const CString& sName = NameArray[nIndex]; 138 _Z4(atlTraceGeneral, 4, _T("sName \"%s\"\n"), sName); 139 CString sValue; 140 CComVariantArray vValue; 141 if(!Map.Lookup(sName, vValue)) 142 continue; 143 CString sComment; 144 #pragma region Friendly Comment 145 switch(vValue.vt) 146 { 147 #pragma region VT_I4 148 case VT_I4: 149 if(vValue.lVal < -999 || vValue.lVal > 999) 150 sComment = _StringHelper::FormatNumber(vValue.lVal); 151 break; 152 #pragma endregion 153 #pragma region VT_R8 154 case VT_R8: 155 if(vValue.dblVal > -0.001 || vValue.dblVal < 0.001) 156 sComment = _StringHelper::FormatNumber(vValue.dblVal, 6); 157 else 158 if(vValue.lVal < -999.0 || vValue.lVal > 999.0) 159 sComment = _StringHelper::FormatNumber(vValue.dblVal, 1); 160 break; 161 #pragma endregion 162 } 163 #pragma endregion 164 const HRESULT nChangeTypeResult = vValue.ChangeType(VT_BSTR); 165 _Z45_HRESULT(nChangeTypeResult); 166 if(FAILED(nChangeTypeResult)) 167 continue; 168 sText.AppendFormat(_T(" * ") _T("`%s`: `%s`"), sName, CString(vValue.bstrVal)); 169 if(!sComment.IsEmpty()) 170 sText.AppendFormat(_T(" // %s"), sComment); 171 sText.Append(_T("\r\n")); 172 } 173 } 174 return sText; 175 } 176 VOID UpdateText() 177 { 178 CString sText; 179 _A(GetObjectCount() == 1); 180 const CComQIPtr<IRunPropertyBagAware> pRunPropertyBagAware = GetObject(0); 181 __D(pRunPropertyBagAware, E_NOINTERFACE); 182 CComPtr<IUnknown> pPropertyBagUnknown; 183 __C(pRunPropertyBagAware->get_Value(&pPropertyBagUnknown)); 184 const CComQIPtr<IPropertyBag2> pPropertyBag2 = pPropertyBagUnknown; 185 __D(pPropertyBag2, E_NOINTERFACE); 186 sText += GetText(pPropertyBag2); 187 m_TextEdit.SetValue(sText); 188 } 189 190 // Window message handlers 191 LRESULT OnInitDialog(HWND, LPARAM) 192 { 193 m_bActivating = TRUE; 194 _ATLTRY 195 { 196 CWaitCursor WaitCursor; 197 m_TextEdit = GetDlgItem(IDC_GENERIC_RUNPROPERTYBAG_TEXT); 198 CLogFont TextFont; 199 CFontHandle(AtlGetDefaultGuiFont()).GetLogFont(TextFont); 200 _tcsncpy_s(TextFont.lfFaceName, _T("Courier New"), _TRUNCATE); 201 TextFont.SetHeight(8); 202 m_TextFont = TextFont.CreateFontIndirect(); 203 m_TextEdit.SetFont(m_TextFont); 204 DlgResize_Init(FALSE); 205 _A(GetObjectCount() >= 1); 206 //const CComQIPtr<IRunPropertyBagAware> pRunPropertyBagAware = GetObject(0); 207 //__D(pRunPropertyBagAware, E_NOINTERFACE); 208 UpdateText(); 209 UpdateControls(); 210 m_ChangeMap.RemoveAll(); 211 m_bActivating = FALSE; 212 } 213 _ATLCATCH(Exception) 214 { 215 AtlExceptionMessageBox(m_hWnd, Exception); 216 for(CWindow Window = GetWindow(GW_CHILD); Window.IsWindow(); Window = Window.GetWindow(GW_HWNDNEXT)) 217 Window.EnableWindow(FALSE); 218 } 219 return TRUE; 220 } 221 LRESULT OnDestroy() 222 { 223 return 0; 224 } 225 LRESULT OnRefresh(UINT, INT, HWND) 226 { 227 CWaitCursor WaitCursor; 228 UpdateText(); 229 UpdateControls(); 230 return 0; 231 } 232 233 // COlePropertyPageT, IRoPropertyPageT, IPropertyPage2, IPropertyPage 234 STDMETHOD(Apply)() 235 { 236 _Z4(atlTraceCOM, 4, _T("...\n")); 237 _ATLTRY 238 { 239 //if(!m_ChangeMap.IsEmpty()) 240 { 241 //CWaitCursor WaitCursor; 242 //m_ChangeMap.RemoveAll(); 243 SetDirty(FALSE); 244 } 245 } 246 _ATLCATCH(Exception) 247 { 248 _C(Exception); 249 } 250 return S_OK; 251 } 252 }; 253 254 OBJECT_ENTRY_AUTO(__uuidof(RunPropertyBagPropertyPage), CRunPropertyBagPropertyPage) 22 255 23 256 //////////////////////////////////////////////////////////// … … 1580 1813 } 1581 1814 #pragma endregion 1815 #pragma region Runtime Property Bag 1816 _ATLTRY 1817 { 1818 const CComQIPtr<IRunPropertyBagAware> pRunPropertyBagAware = Data.m_pBaseFilter; 1819 if(pRunPropertyBagAware) 1820 { 1821 CComPtr<IUnknown> pPropertyBagUnknown; 1822 __C(pRunPropertyBagAware->get_Value(&pPropertyBagUnknown)); 1823 const CComQIPtr<IPropertyBag2> pPropertyBag2 = pPropertyBagUnknown; 1824 __D(pPropertyBag2, E_NOINTERFACE); 1825 const CString sPropertyBagText = CRunPropertyBagPropertyPage::GetText(pPropertyBag2); 1826 if(!sPropertyBagText.IsEmpty()) 1827 { 1828 sText += AtlFormatString(_T("## ") _T("Runtime Properties") _T("\r\n") _T("\r\n")); 1829 sText += sPropertyBagText; 1830 sText += _T("\r\n"); 1831 } 1832 } 1833 } 1834 _ATLCATCHALL() 1835 { 1836 _Z_EXCEPTION(); 1837 } 1838 #pragma endregion 1582 1839 m_TextEdit.SetValue(sText); 1583 1840 m_ApplyButton.EnableWindow(FALSE); … … 1865 2122 const CStringW sClassIdentifierString = _FilterGraphHelper::GetFilterClassIdentifierString(pBaseFilter); 1866 2123 if(!sClassIdentifierString.IsEmpty()) 1867 sText += AtlFormatString(_T(" * ") _T("Class: %s %s") _T("\r\n"), I(sClassIdentifierString), I(_FilterGraphHelper::GetFilterClassDescription(pBaseFilter))); 2124 { 2125 CLSID ClassIdentifier = CLSID_NULL; 2126 const BOOL bClassIdentifierAvailable = _PersistHelper::ClassIdentifierFromString(sClassIdentifierString, ClassIdentifier); 2127 if(bClassIdentifierAvailable && ClassIdentifier != CLSID_NULL) 2128 { 2129 sText += AtlFormatString(_T(" * ") _T("Class: %s %s") _T("\r\n"), I(sClassIdentifierString), I(_FilterGraphHelper::GetFilterClassDescription(pBaseFilter))); 2130 _ATLTRY 2131 { 2132 const CString sPath = _RegKeyHelper::QueryStringValue(HKEY_CLASSES_ROOT, AtlFormatString(_T("CLSID\\%ls\\InprocServer32"), sClassIdentifierString)); 2133 if(!sPath.IsEmpty()) 2134 { 2135 sText += AtlFormatString(_T(" * ") _T("Inproc Server: %s") _T("\r\n"), I(sPath)); 2136 const ULONGLONG nProductVersion = _VersionInfoHelper::GetProductVersion(sPath); 2137 if(nProductVersion && (nProductVersion + 1)) 2138 sText += AtlFormatString(_T(" * ") _T("Product Version: %s") _T("\r\n"), I(_VersionInfoHelper::GetVersionString(nProductVersion))); 2139 const ULONGLONG nFileVersion = _VersionInfoHelper::GetFileVersion(sPath); 2140 if(nFileVersion && (nFileVersion + 1)) 2141 sText += AtlFormatString(_T(" * ") _T("File Version: %s") _T("\r\n"), I(_VersionInfoHelper::GetVersionString(nFileVersion))); 2142 } 2143 } 2144 _ATLCATCHALL() 2145 { 2146 _Z_EXCEPTION(); 2147 } 2148 } 2149 } 1868 2150 _FilterGraphHelper::CPinArray InputPinArray; 1869 2151 if(_FilterGraphHelper::GetFilterPins(pBaseFilter, PINDIR_INPUT, InputPinArray)) … … 2368 2650 sText += _T("\r\n"); 2369 2651 #pragma endregion 2652 #pragma region Runtime Property Bag 2653 BOOL bRunPropertyBagHeaderAdded = FALSE; 2654 for(SIZE_T nIndex = 0; nIndex < FilterArray.GetCount(); nIndex++) 2655 _ATLTRY 2656 { 2657 const CComPtr<IBaseFilter>& pBaseFilter = FilterArray[nIndex]; 2658 const CComQIPtr<IRunPropertyBagAware> pRunPropertyBagAware = pBaseFilter; 2659 if(!pRunPropertyBagAware) 2660 continue; 2661 _Z4(atlTraceGeneral, 4, _T("pBaseFilter 0x%p \"%ls\"\n"), pBaseFilter, _FilterGraphHelper::GetFilterName(pBaseFilter)); 2662 CComPtr<IUnknown> pPropertyBagUnknown; 2663 __C(pRunPropertyBagAware->get_Value(&pPropertyBagUnknown)); 2664 const CComQIPtr<IPropertyBag2> pPropertyBag2 = pPropertyBagUnknown; 2665 __D(pPropertyBag2, E_NOINTERFACE); 2666 const CString sPropertyBagText = CRunPropertyBagPropertyPage::GetText(pPropertyBag2); 2667 if(sPropertyBagText.IsEmpty()) 2668 continue; 2669 if(!bRunPropertyBagHeaderAdded) 2670 { 2671 sText += AtlFormatString(_T("## ") _T("Runtime Properties") _T("\r\n") _T("\r\n")); 2672 bRunPropertyBagHeaderAdded = TRUE; 2673 } 2674 sText += AtlFormatString(_T("### ") _T("Filter: %ls") _T("\r\n") _T("\r\n"), _FilterGraphHelper::GetFilterName(pBaseFilter)); 2675 sText += sPropertyBagText; 2676 sText += _T("\r\n"); 2677 } 2678 _ATLCATCHALL() 2679 { 2680 _Z_EXCEPTION(); 2681 } 2682 #pragma endregion 2370 2683 } 2371 2684 #pragma endregion -
trunk/DirectShowSpy/resource.h
r258 r265 66 66 #define IDD_FILTERGRAPHHELPER_PROPERTYFRAME 1500 67 67 #define IDC_FILTERGRAPHHELPER_PROPERTYFRAME_TREESPLITTER 1505 68 #define IDC_FILTERGRAPHHELPER_PROPERTYFRAME_TREE 1505 68 69 #define IDC_FILTERGRAPHHELPER_PROPERTYFRAME_TREEPANE 1506 69 #define IDC_FILTERGRAPHHELPER_PROPERTYFRAME_TREE 150570 70 #define IDC_FILTERGRAPHHELPER_PROPERTYFRAME_BODYPANE 1506 71 71 #define IDC_FILTERGRAPHHELPER_PROPERTYFRAME_APPLY 1510 … … 101 101 #define IDC_FILTERGRAPHHELPER_EMAIL_LOG_DELETETITLE 1812 102 102 #define IDC_FILTERGRAPHHELPER_EMAIL_LOG_DELETE 1813 103 #define IDR_GENERIC_RUNPROPERTYBAGPROPERTYPAGE 1900 104 #define IDD_GENERIC_RUNPROPERTYBAG 1910 105 #define IDC_GENERIC_RUNPROPERTYBAG_INTRODUCTION 1911 106 #define IDC_GENERIC_RUNPROPERTYBAG_TEXT 1912 107 #define IDC_GENERIC_RUNPROPERTYBAG_REFRESH 1913 103 108 #define IDR_FILTERGRAPHSPY 25000 104 109 #define IDR_NOTHREADFILTERGRAPHSPY 25001 … … 124 129 #define _APS_NEXT_RESOURCE_VALUE 211 125 130 #define _APS_NEXT_COMMAND_VALUE 32783 126 #define _APS_NEXT_CONTROL_VALUE 23 6131 #define _APS_NEXT_CONTROL_VALUE 239 127 132 #define _APS_NEXT_SYMED_VALUE 103 128 133 #endif
Note: See TracChangeset
for help on using the changeset viewer.