Changeset 290


Ignore:
Timestamp:
May 28, 2014, 12:33:36 AM (10 years ago)
Author:
roman
Message:

Added runtime event interface and generic property page

Location:
trunk/DirectShowSpy
Files:
2 added
1 deleted
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/DirectShowSpy/DirectShowSpy.idl

    r285 r290  
    219219                [default] interface IUnknown; //IPropertyPage;
    220220        };
    221 };
     221        [
     222                object,
     223                uuid(DA0D924F-1AC0-496D-AE44-CC2BD8CE7CFA),
     224                nonextensible,
     225                helpstring("IRunEventAware Interface"),
     226                pointer_default(unique)
     227        ]
     228        interface IRunEventAware : IDispatch
     229        {
     230                [propget, id(DISPID_VALUE)] HRESULT Value([out, retval] VARIANT* pvValue);
     231                [propget, id(1)] HRESULT Capture([out, retval] VARIANT_BOOL* pbCapture);
     232                [propput, id(1)] HRESULT Capture([in] VARIANT_BOOL bCapture);
     233        };
     234        [
     235                uuid(AD0E84E9-DE25-4C1A-85A5-47406604E144),
     236                helpstring("RunEventPropertyPage Class")
     237        ]
     238        coclass RunEventPropertyPage
     239        {
     240                [default] interface IUnknown; //IPropertyPage;
     241        };
     242};
  • trunk/DirectShowSpy/DirectShowSpy.rc

    r285 r290  
    6060
    6161VS_VERSION_INFO VERSIONINFO
    62  FILEVERSION  1, 0, 0, 1483
     62 FILEVERSION  1, 0, 0, 1515
    6363 PRODUCTVERSION 1,0,0,1
    6464 FILEFLAGSMASK 0x3fL
     
    7979            VALUE "CompanyName", "Roman Ryltsov"
    8080            VALUE "FileDescription", "Alax.Info DirectShow Spy Module"
    81             VALUE "FileVersion",  "1, 0, 0, 1483\0"
     81            VALUE "FileVersion",  "1, 0, 0, 1515\0"
    8282            VALUE "InternalName", "DirectShowSpy.dll"
    8383            VALUE "LegalCopyright", "Copyright © Alax.Info, Roman Ryltsov, 2008-2014"
     
    106106IDR_SYSTEMDEVICEENUMERATORSPY REGISTRY                "GenericClass.rgs"
    107107IDR_FILTERGRAPHHELPER   REGISTRY                "GenericClass.rgs"
    108 IDR_GENERIC_RUNPROPERTYBAGPROPERTYPAGE REGISTRY                "GenericPropertyPage.rgs"
     108IDR_GENERIC_RUNPROPERTYBAG_PROPERTYPAGE REGISTRY                "GenericPropertyPage.rgs"
     109IDR_GENERIC_RUNEVENT_PROPERTYPAGE REGISTRY                "GenericPropertyPage.rgs"
    109110
    110111/////////////////////////////////////////////////////////////////////////////
     
    322323
    323324
     325IDD_GENERIC_RUNEVENT DIALOGEX 0, 0, 227, 200
     326STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD
     327FONT 8, "MS Shell Dlg", 400, 0, 0x0
     328BEGIN
     329    CONTROL         "&Capture runtime events",IDC_GENERIC_RUNEVENT_CAPTURE,
     330                    "Button",BS_AUTOCHECKBOX | WS_TABSTOP,6,6,210,10
     331    EDITTEXT        IDC_GENERIC_RUNEVENT_TEXT,6,24,215,150,ES_MULTILINE | ES_AUTOVSCROLL | ES_AUTOHSCROLL | ES_READONLY | WS_VSCROLL | WS_HSCROLL
     332    PUSHBUTTON      "&Refresh",IDC_GENERIC_RUNEVENT_REFRESH,6,180,50,14
     333END
     334
     335
    324336/////////////////////////////////////////////////////////////////////////////
    325337//
     
    445457STRINGTABLE
    446458BEGIN
    447     IDR_GENERIC_RUNPROPERTYBAGPROPERTYPAGE
     459    IDR_GENERIC_RUNPROPERTYBAG_PROPERTYPAGE
    448460                            "\n\nAlax.Info DirectShow Spy Runtime Property Bag Property Page\n"
    449 END
    450 
    451 STRINGTABLE
    452 BEGIN
    453     IDD_GENERIC_RUNPROPERTYBAG "Runtime"
     461        IDR_GENERIC_RUNEVENT_PROPERTYPAGE
     462                                                        "\n\nAlax.Info DirectShow Spy Runtime Event Property Page\n"
     463END
     464
     465STRINGTABLE
     466BEGIN
     467    IDD_GENERIC_RUNPROPERTYBAG "Runtime Properties"
     468        IDD_GENERIC_RUNEVENT "Runtime Events"
    454469END
    455470
  • trunk/DirectShowSpy/DirectShowSpy.vcxproj

    r266 r290  
    473473    <ClInclude Include="FilterMapperSpy.h" />
    474474    <ClInclude Include="GraphBuilderCallbackPropertySheet.h" />
    475     <ClInclude Include="PropertyBag.h" />
     475    <ClInclude Include="RunPropertyBag.h" />
    476476    <ClInclude Include="Resource.h" />
     477    <ClInclude Include="RunEvent.h" />
    477478    <ClInclude Include="stdafx.h" />
    478479    <ClInclude Include="SystemDeviceEnumeratorSpy.h" />
  • trunk/DirectShowSpy/DirectShowSpy.vcxproj.filters

    r266 r290  
    113113      <Filter>Header Files</Filter>
    114114    </ClInclude>
    115     <ClInclude Include="PropertyBag.h">
     115    <ClInclude Include="RunEvent.h">
     116      <Filter>Header Files</Filter>
     117    </ClInclude>
     118    <ClInclude Include="RunPropertyBag.h">
    116119      <Filter>Header Files</Filter>
    117120    </ClInclude>
  • trunk/DirectShowSpy/DirectShowSpy_i.c

    r285 r290  
    77
    88 /* File created by MIDL compiler version 7.00.0555 */
    9 /* at Wed May 07 14:27:04 2014
     9/* at Wed May 28 01:18:35 2014
    1010 */
    1111/* Compiler settings for DirectShowSpy.idl:
     
    118118MIDL_DEFINE_GUID(CLSID, CLSID_RunPropertyBagPropertyPage,0x76127943,0xD22E,0x4C4E,0x9D,0x9B,0x17,0x3C,0x22,0x4D,0x0E,0xE4);
    119119
     120
     121MIDL_DEFINE_GUID(IID, IID_IRunEventAware,0xDA0D924F,0x1AC0,0x496D,0xAE,0x44,0xCC,0x2B,0xD8,0xCE,0x7C,0xFA);
     122
     123
     124MIDL_DEFINE_GUID(CLSID, CLSID_RunEventPropertyPage,0xAD0E84E9,0xDE25,0x4C1A,0x85,0xA5,0x47,0x40,0x66,0x04,0xE1,0x44);
     125
    120126#undef MIDL_DEFINE_GUID
    121127
  • trunk/DirectShowSpy/DirectShowSpy_i.h

    r285 r290  
    55
    66 /* File created by MIDL compiler version 7.00.0555 */
    7 /* at Wed May 07 14:27:04 2014
     7/* at Wed May 28 01:18:35 2014
    88 */
    99/* Compiler settings for DirectShowSpy.idl:
     
    178178
    179179
     180#ifndef __IRunEventAware_FWD_DEFINED__
     181#define __IRunEventAware_FWD_DEFINED__
     182typedef interface IRunEventAware IRunEventAware;
     183#endif  /* __IRunEventAware_FWD_DEFINED__ */
     184
     185
     186#ifndef __RunEventPropertyPage_FWD_DEFINED__
     187#define __RunEventPropertyPage_FWD_DEFINED__
     188
     189#ifdef __cplusplus
     190typedef class RunEventPropertyPage RunEventPropertyPage;
     191#else
     192typedef struct RunEventPropertyPage RunEventPropertyPage;
     193#endif /* __cplusplus */
     194
     195#endif  /* __RunEventPropertyPage_FWD_DEFINED__ */
     196
     197
    180198/* header files for imported files */
    181199#include "oaidl.h"
     
    15841602RunPropertyBagPropertyPage;
    15851603#endif
     1604
     1605#ifndef __IRunEventAware_INTERFACE_DEFINED__
     1606#define __IRunEventAware_INTERFACE_DEFINED__
     1607
     1608/* interface IRunEventAware */
     1609/* [unique][helpstring][nonextensible][uuid][object] */
     1610
     1611
     1612EXTERN_C const IID IID_IRunEventAware;
     1613
     1614#if defined(__cplusplus) && !defined(CINTERFACE)
     1615   
     1616    MIDL_INTERFACE("DA0D924F-1AC0-496D-AE44-CC2BD8CE7CFA")
     1617    IRunEventAware : public IDispatch
     1618    {
     1619    public:
     1620        virtual /* [id][propget] */ HRESULT STDMETHODCALLTYPE get_Value(
     1621            /* [retval][out] */ VARIANT *pvValue) = 0;
     1622       
     1623        virtual /* [id][propget] */ HRESULT STDMETHODCALLTYPE get_Capture(
     1624            /* [retval][out] */ VARIANT_BOOL *pbCapture) = 0;
     1625       
     1626        virtual /* [id][propput] */ HRESULT STDMETHODCALLTYPE put_Capture(
     1627            /* [in] */ VARIANT_BOOL bCapture) = 0;
     1628       
     1629    };
     1630   
     1631#else   /* C style interface */
     1632
     1633    typedef struct IRunEventAwareVtbl
     1634    {
     1635        BEGIN_INTERFACE
     1636       
     1637        HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
     1638            IRunEventAware * This,
     1639            /* [in] */ REFIID riid,
     1640            /* [annotation][iid_is][out] */
     1641            __RPC__deref_out  void **ppvObject);
     1642       
     1643        ULONG ( STDMETHODCALLTYPE *AddRef )(
     1644            IRunEventAware * This);
     1645       
     1646        ULONG ( STDMETHODCALLTYPE *Release )(
     1647            IRunEventAware * This);
     1648       
     1649        HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )(
     1650            IRunEventAware * This,
     1651            /* [out] */ UINT *pctinfo);
     1652       
     1653        HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )(
     1654            IRunEventAware * This,
     1655            /* [in] */ UINT iTInfo,
     1656            /* [in] */ LCID lcid,
     1657            /* [out] */ ITypeInfo **ppTInfo);
     1658       
     1659        HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )(
     1660            IRunEventAware * This,
     1661            /* [in] */ REFIID riid,
     1662            /* [size_is][in] */ LPOLESTR *rgszNames,
     1663            /* [range][in] */ UINT cNames,
     1664            /* [in] */ LCID lcid,
     1665            /* [size_is][out] */ DISPID *rgDispId);
     1666       
     1667        /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )(
     1668            IRunEventAware * This,
     1669            /* [in] */ DISPID dispIdMember,
     1670            /* [in] */ REFIID riid,
     1671            /* [in] */ LCID lcid,
     1672            /* [in] */ WORD wFlags,
     1673            /* [out][in] */ DISPPARAMS *pDispParams,
     1674            /* [out] */ VARIANT *pVarResult,
     1675            /* [out] */ EXCEPINFO *pExcepInfo,
     1676            /* [out] */ UINT *puArgErr);
     1677       
     1678        /* [id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Value )(
     1679            IRunEventAware * This,
     1680            /* [retval][out] */ VARIANT *pvValue);
     1681       
     1682        /* [id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Capture )(
     1683            IRunEventAware * This,
     1684            /* [retval][out] */ VARIANT_BOOL *pbCapture);
     1685       
     1686        /* [id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_Capture )(
     1687            IRunEventAware * This,
     1688            /* [in] */ VARIANT_BOOL bCapture);
     1689       
     1690        END_INTERFACE
     1691    } IRunEventAwareVtbl;
     1692
     1693    interface IRunEventAware
     1694    {
     1695        CONST_VTBL struct IRunEventAwareVtbl *lpVtbl;
     1696    };
     1697
     1698   
     1699
     1700#ifdef COBJMACROS
     1701
     1702
     1703#define IRunEventAware_QueryInterface(This,riid,ppvObject)      \
     1704    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
     1705
     1706#define IRunEventAware_AddRef(This)     \
     1707    ( (This)->lpVtbl -> AddRef(This) )
     1708
     1709#define IRunEventAware_Release(This)    \
     1710    ( (This)->lpVtbl -> Release(This) )
     1711
     1712
     1713#define IRunEventAware_GetTypeInfoCount(This,pctinfo)   \
     1714    ( (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) )
     1715
     1716#define IRunEventAware_GetTypeInfo(This,iTInfo,lcid,ppTInfo)    \
     1717    ( (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) )
     1718
     1719#define IRunEventAware_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId)  \
     1720    ( (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) )
     1721
     1722#define IRunEventAware_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr)    \
     1723    ( (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) )
     1724
     1725
     1726#define IRunEventAware_get_Value(This,pvValue)  \
     1727    ( (This)->lpVtbl -> get_Value(This,pvValue) )
     1728
     1729#define IRunEventAware_get_Capture(This,pbCapture)      \
     1730    ( (This)->lpVtbl -> get_Capture(This,pbCapture) )
     1731
     1732#define IRunEventAware_put_Capture(This,bCapture)       \
     1733    ( (This)->lpVtbl -> put_Capture(This,bCapture) )
     1734
     1735#endif /* COBJMACROS */
     1736
     1737
     1738#endif  /* C style interface */
     1739
     1740
     1741
     1742
     1743#endif  /* __IRunEventAware_INTERFACE_DEFINED__ */
     1744
     1745
     1746EXTERN_C const CLSID CLSID_RunEventPropertyPage;
     1747
     1748#ifdef __cplusplus
     1749
     1750class DECLSPEC_UUID("AD0E84E9-DE25-4C1A-85A5-47406604E144")
     1751RunEventPropertyPage;
     1752#endif
    15861753#endif /* __AlaxInfoDirectShowSpy_LIBRARY_DEFINED__ */
    15871754
  • trunk/DirectShowSpy/DirectShowSpy_p.c

    r285 r290  
    55
    66 /* File created by MIDL compiler version 7.00.0555 */
    7 /* at Wed May 07 14:27:04 2014
     7/* at Wed May 28 01:18:35 2014
    88 */
    99/* Compiler settings for DirectShowSpy.idl:
  • trunk/DirectShowSpy/FilterGraphHelper.h

    r285 r290  
    2020#include "DirectShowSpy_i.h"
    2121#include "Common.h"
    22 #include "PropertyBag.h"
     22#include "RunPropertyBag.h"
     23#include "RunEvent.h"
    2324#include "AboutDialog.h"
    2425#include "..\..\Repository-Private\Utilities\EmailTools\Message.h"
     
    3233HRESULT FilterGraphHelper_OpenGraphStudioNext(LONG nParentWindowHandle, LPCWSTR pszMonikerDisplayName, VARIANT_BOOL* pbResult);
    3334HRESULT FilterGraphHelper_OpenGraphEdit(LONG nParentWindowHandle, LPCWSTR pszMonikerDisplayName, VARIANT_BOOL* pbResult);
    34 
    35 ////////////////////////////////////////////////////////////
    36 // CFilterGraphHelper
    3735
    3836////////////////////////////////////////////////////////////
     
    4644{
    4745public:
    48         enum { IDR = IDR_GENERIC_RUNPROPERTYBAGPROPERTYPAGE };
     46        enum { IDR = IDR_GENERIC_RUNPROPERTYBAG_PROPERTYPAGE };
    4947        enum { IDD = IDD_GENERIC_RUNPROPERTYBAG };
    5048
     
    8886        CRunPropertyBagPropertyPage()
    8987        {
    90                 _Z4(atlTraceRefcount, 4, _T("this 0x%p\n"), this);
     88                _Z4_THIS();
    9189        }
    9290        ~CRunPropertyBagPropertyPage()
    9391        {
    94                 _Z4(atlTraceRefcount, 4, _T("this 0x%p\n"), this);
     92                _Z4_THIS();
    9593        }
    9694        VOID UpdateControls()
     
    10199                CString sText;
    102100                _A(GetObjectCount() == 1);
    103                 m_TextEdit.SetValue(CPropertyBagHelper::GetPropertyBagText(GetObject(0)));
     101                m_TextEdit.SetValue(CRunPropertyBagHelper::GetPropertyBagText(GetObject(0)));
    104102        }
    105103
     
    169167
    170168OBJECT_ENTRY_AUTO(__uuidof(RunPropertyBagPropertyPage), CRunPropertyBagPropertyPage)
     169
     170////////////////////////////////////////////////////////////
     171// CRunEventPropertyPage
     172
     173class ATL_NO_VTABLE CRunEventPropertyPage :
     174        public CComObjectRootEx<CComSingleThreadModel>,
     175        public CComCoClass<CRunEventPropertyPage, &__uuidof(RunEventPropertyPage)>,
     176        public COlePropertyPageT<CRunEventPropertyPage>,
     177        public CDialogResize<CRunEventPropertyPage>
     178{
     179public:
     180        enum { IDR = IDR_GENERIC_RUNEVENT_PROPERTYPAGE };
     181        enum { IDD = IDD_GENERIC_RUNEVENT };
     182
     183BEGIN_COM_MAP(CRunEventPropertyPage)
     184        COM_INTERFACE_ENTRY(IPropertyPage2)
     185        COM_INTERFACE_ENTRY(IPropertyPage)
     186END_COM_MAP()
     187
     188BEGIN_MSG_MAP_EX(CRunEventPropertyPage)
     189        CHAIN_MSG_MAP(COlePropertyPage)
     190        CHAIN_MSG_MAP(CDialogResize<CRunEventPropertyPage>)
     191        MSG_WM_INITDIALOG(OnInitDialog)
     192        MSG_WM_DESTROY(OnDestroy)
     193        COMMAND_HANDLER_EX(IDC_GENERIC_RUNEVENT_CAPTURE, BN_CLICKED, OnCaptureButtonClicked)
     194        COMMAND_ID_HANDLER_EX(IDC_GENERIC_RUNEVENT_REFRESH, OnRefresh)
     195        REFLECT_NOTIFICATIONS()
     196END_MSG_MAP()
     197
     198BEGIN_DLGRESIZE_MAP(CRunEventPropertyPage)
     199        DLGRESIZE_CONTROL(IDC_GENERIC_RUNEVENT_CAPTURE, DLSZ_SIZE_X)
     200        DLGRESIZE_CONTROL(IDC_GENERIC_RUNEVENT_TEXT, DLSZ_SIZE_X | DLSZ_SIZE_Y)
     201        DLGRESIZE_CONTROL(IDC_GENERIC_RUNEVENT_REFRESH, DLSZ_MOVE_Y)
     202END_DLGRESIZE_MAP()
     203
     204public:
     205
     206private:
     207        BOOL m_bActivating;
     208        CButton m_CaptureButton;
     209        CRoEdit m_TextEdit;
     210        CButton m_RefreshButton;
     211        CRoMapT<INT_PTR, BOOL> m_ChangeMap;
     212
     213public:
     214// CRunEventPropertyPage
     215        static CString GetObjectFriendlyName()
     216        {
     217                return _StringHelper::GetLine(IDR, 2);
     218        }
     219        static HRESULT WINAPI UpdateRegistry(BOOL bRegister)
     220        {
     221                _Z2(atlTraceRegistrar, 2, _T("bRegister %d\n"), bRegister);
     222                return DefaultUpdateRegistry(bRegister);
     223        }
     224        CRunEventPropertyPage()
     225        {
     226                _Z4_THIS();
     227        }
     228        ~CRunEventPropertyPage()
     229        {
     230                _Z4_THIS();
     231        }
     232        VOID UpdateControls()
     233        {
     234                const BOOL bCapture = m_CaptureButton.GetCheck();
     235                //m_TextEdit.EnableWindow(bCapture);
     236                m_RefreshButton.EnableWindow(bCapture);
     237        }
     238        VOID Refresh()
     239        {
     240                const CComQIPtr<IRunEventAware> pRunEventAware = GetObject(0);
     241                if(!pRunEventAware)
     242                        return;
     243                CComVariantArray vValue;
     244                __C(pRunEventAware->get_Value(&vValue));
     245                CString sText;
     246                _ATLTRY
     247                {
     248                        if(vValue.vt > VT_NULL)
     249                        {
     250                                CRoArrayT<CComVariantArray> Array;
     251                                vValue.ToElementArray(Array);
     252                                for(SIZE_T nIndex = 0; nIndex < Array.GetCount(); nIndex++)
     253                                {
     254                                        CRunEventHelper::CEvents::CItem Item;
     255                                        if(!Item.SetAsVariant(Array[nIndex]))
     256                                                continue;
     257                                        sText.AppendFormat(_T("%d") _T("\t") _T("%hs"), (LONG) (Item.m_nTime / 10000i64), Item.m_pszText);
     258                                        sText.Append(_T("\r\n"));
     259                                }
     260                        }
     261                }
     262                _ATLCATCHALL()
     263                {
     264                        _Z_EXCEPTION();
     265                }
     266                m_TextEdit.SetValue(sText);
     267        }
     268
     269// Window message handlers
     270        LRESULT OnInitDialog(HWND, LPARAM)
     271        {
     272                m_bActivating = TRUE;
     273                _ATLTRY
     274                {
     275                        m_CaptureButton = GetDlgItem(IDC_GENERIC_RUNEVENT_CAPTURE);
     276                        m_TextEdit = GetDlgItem(IDC_GENERIC_RUNEVENT_TEXT);
     277                        m_RefreshButton = GetDlgItem(IDC_GENERIC_RUNEVENT_REFRESH);
     278                        DlgResize_Init(FALSE);
     279                        //m_OutputSampleTimeEdit = GetDlgItem(IDC_SUSPENSIONFILTER_SAMPLE_OUTPUTTIME);
     280                        _A(GetObjectCount() >= 1);
     281                        const CComQIPtr<IRunEventAware> pRunEventAware = GetObject(0);
     282                        __D(pRunEventAware, E_NOINTERFACE);
     283                        VARIANT_BOOL bCapture = ATL_VARIANT_FALSE;
     284                        __C(pRunEventAware->get_Capture(&bCapture));
     285                        m_CaptureButton.SetCheck(bCapture != ATL_VARIANT_FALSE);
     286                        if(bCapture != ATL_VARIANT_FALSE)
     287                                Refresh();
     288                        UpdateControls();
     289                        m_ChangeMap.RemoveAll();
     290                        m_bActivating = FALSE;
     291                }
     292                _ATLCATCH(Exception)
     293                {
     294                        AtlExceptionMessageBox(m_hWnd, Exception);
     295                        for(CWindow Window = GetWindow(GW_CHILD); Window.IsWindow(); Window = Window.GetWindow(GW_HWNDNEXT))
     296                                Window.EnableWindow(FALSE);
     297                }
     298                return TRUE;
     299        }
     300        LRESULT OnDestroy()
     301        {
     302                return 0;
     303        }
     304        LRESULT OnCaptureButtonClicked(UINT, INT, HWND)
     305        {
     306                CWaitCursor WaitCursor;
     307                const CComQIPtr<IRunEventAware> pRunEventAware = GetObject(0);
     308                if(pRunEventAware)
     309                        _ATLTRY
     310                        {
     311                                const BOOL bCapture = m_CaptureButton.GetCheck();
     312                                __C(pRunEventAware->put_Capture(bCapture ? ATL_VARIANT_TRUE : ATL_VARIANT_FALSE));
     313                        }
     314                        _ATLCATCHALL()
     315                        {
     316                                _Z_EXCEPTION();
     317                        }
     318                UpdateControls();
     319                return 0;
     320        }
     321        LRESULT OnRefresh(UINT, INT, HWND)
     322        {
     323                CWaitCursor WaitCursor;
     324                Refresh();
     325                UpdateControls();
     326                return 0;
     327        }
     328
     329// COlePropertyPageT, IRoPropertyPageT, IPropertyPage2, IPropertyPage
     330        STDMETHOD(Apply)()
     331        {
     332                _Z4(atlTraceCOM, 4, _T("...\n"));
     333                _ATLTRY
     334                {
     335                        //if(!m_ChangeMap.IsEmpty())
     336                        {
     337                                //CWaitCursor WaitCursor;
     338                                //m_ChangeMap.RemoveAll();
     339                                SetDirty(FALSE);
     340                        }
     341                }
     342                _ATLCATCH(Exception)
     343                {
     344                        _C(Exception);
     345                }
     346                return S_OK;
     347        }
     348};
     349
     350OBJECT_ENTRY_AUTO(__uuidof(RunEventPropertyPage), CRunEventPropertyPage)
    171351
    172352////////////////////////////////////////////////////////////
     
    17391919                                                _ATLTRY
    17401920                                                {
    1741                                                         const CString sPropertyBagText = CPropertyBagHelper::GetPropertyBagText(Data.m_pBaseFilter, CComQIPtr<ISpy>(m_Owner.m_pFilterGraph));
     1921                                                        const CString sPropertyBagText = CRunPropertyBagHelper::GetPropertyBagText(Data.m_pBaseFilter, CComQIPtr<ISpy>(m_Owner.m_pFilterGraph));
    17421922                                                        if(!sPropertyBagText.IsEmpty())
    17431923                                                        {
     
    19152095        CFilterGraphHelper()
    19162096        {
    1917                 _Z4(atlTraceRefcount, 4, _T("this 0x%p\n"), this);
     2097                _Z4_THIS();
    19182098        }
    19192099        ~CFilterGraphHelper()
    19202100        {
    1921                 _Z4(atlTraceRefcount, 4, _T("this 0x%p\n"), this);
     2101                _Z4_THIS();
    19222102        }
    19232103        static CString FormatIdentifier(LPCSTR pszValue)
     
    26852865                                        const CComPtr<IBaseFilter>& pBaseFilter = FilterArray[nIndex];
    26862866                                        //_Z4(atlTraceGeneral, 4, _T("pBaseFilter 0x%p \"%ls\"\n"), pBaseFilter, _FilterGraphHelper::GetFilterName(pBaseFilter));
    2687                                         const CString sPropertyBagText = CPropertyBagHelper::GetPropertyBagText(pBaseFilter, pSpy);
     2867                                        const CString sPropertyBagText = CRunPropertyBagHelper::GetPropertyBagText(pBaseFilter, pSpy);
    26882868                                        if(sPropertyBagText.IsEmpty())
    26892869                                                continue;
  • trunk/DirectShowSpy/FilterGraphSpy.h

    r285 r290  
    1919#include "DirectShowSpy_i.h"
    2020#include "Common.h"
    21 #include "PropertyBag.h"
     21#include "RunPropertyBag.h"
    2222
    2323HRESULT FilterGraphHelper_OpenGraphStudioNext(LONG nParentWindowHandle, LPCWSTR pszMonikerDisplayName, VARIANT_BOOL* pbResult);
     
    790790                        __D(pvValue, E_POINTER);
    791791                        VariantInit(pvValue);
    792                         _V(CPropertyBagHelper::ReadRunPropertyBag(pBaseFilterUnknown, bAllowExtension != ATL_VARIANT_FALSE).Detach(pvValue));
     792                        _V(CRunPropertyBagHelper::ReadRunPropertyBag(pBaseFilterUnknown, bAllowExtension != ATL_VARIANT_FALSE).Detach(pvValue));
    793793                }
    794794                _ATLCATCHALL()
  • trunk/DirectShowSpy/resource.h

    r265 r290  
    101101#define IDC_FILTERGRAPHHELPER_EMAIL_LOG_DELETETITLE 1812
    102102#define IDC_FILTERGRAPHHELPER_EMAIL_LOG_DELETE 1813
    103 #define IDR_GENERIC_RUNPROPERTYBAGPROPERTYPAGE 1900
     103#define IDR_GENERIC_RUNPROPERTYBAG_PROPERTYPAGE 1900
    104104#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
     105#define IDC_GENERIC_RUNPROPERTYBAG_INTRODUCTION 1915
     106#define IDC_GENERIC_RUNPROPERTYBAG_TEXT    1916
     107#define IDC_GENERIC_RUNPROPERTYBAG_REFRESH 1917
     108#define IDR_GENERIC_RUNEVENT_PROPERTYPAGE 1950
     109#define IDD_GENERIC_RUNEVENT 1960
     110#define IDC_GENERIC_RUNEVENT_CAPTURE 1965
     111#define IDC_GENERIC_RUNEVENT_TEXT    1966
     112#define IDC_GENERIC_RUNEVENT_REFRESH 1967
     113
    108114#define IDR_FILTERGRAPHSPY              25000
    109115#define IDR_NOTHREADFILTERGRAPHSPY      25001
Note: See TracChangeset for help on using the changeset viewer.