Changeset 831


Ignore:
Timestamp:
Mar 13, 2018, 12:24:24 PM (5 years ago)
Author:
roman
Message:

Upgrade to VS2017; removed exception filter (hook); improved tracing

Location:
trunk/DirectShowSpy
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/DirectShowSpy/DirectShowSpy.sln

    r763 r831  
    11
    22Microsoft Visual Studio Solution File, Format Version 12.00
    3 # Visual Studio 2015
     3# Visual Studio 2017
    44VisualStudioVersion = 12.0.40629.0
    55MinimumVisualStudioVersion = 10.0.40219.1
  • trunk/DirectShowSpy/DirectShowSpy.vcxproj

    r763 r831  
    3131    <RootNamespace>DirectShowSpy</RootNamespace>
    3232    <Keyword>AtlProj</Keyword>
    33     <WindowsTargetPlatformVersion>10.0.15063.0</WindowsTargetPlatformVersion>
     33    <WindowsTargetPlatformVersion>10.0.16299.0</WindowsTargetPlatformVersion>
    3434  </PropertyGroup>
    3535  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
    3636  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Trace|Win32'" Label="Configuration">
    3737    <ConfigurationType>DynamicLibrary</ConfigurationType>
    38     <PlatformToolset>v140_xp</PlatformToolset>
     38    <PlatformToolset>v141</PlatformToolset>
    3939    <UseOfAtl>Static</UseOfAtl>
    4040    <CharacterSet>Unicode</CharacterSet>
     
    4343  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
    4444    <ConfigurationType>DynamicLibrary</ConfigurationType>
    45     <PlatformToolset>v140_xp</PlatformToolset>
     45    <PlatformToolset>v141</PlatformToolset>
    4646    <UseOfAtl>Static</UseOfAtl>
    4747    <CharacterSet>Unicode</CharacterSet>
     
    5050  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
    5151    <ConfigurationType>DynamicLibrary</ConfigurationType>
    52     <PlatformToolset>v140_xp</PlatformToolset>
     52    <PlatformToolset>v141</PlatformToolset>
    5353    <UseOfAtl>Dynamic</UseOfAtl>
    5454    <CharacterSet>Unicode</CharacterSet>
     
    5656  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Trace|x64'" Label="Configuration">
    5757    <ConfigurationType>DynamicLibrary</ConfigurationType>
    58     <PlatformToolset>v140_xp</PlatformToolset>
     58    <PlatformToolset>v141</PlatformToolset>
    5959    <UseOfAtl>Static</UseOfAtl>
    6060    <CharacterSet>Unicode</CharacterSet>
     
    6363  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
    6464    <ConfigurationType>DynamicLibrary</ConfigurationType>
    65     <PlatformToolset>v140_xp</PlatformToolset>
     65    <PlatformToolset>v141</PlatformToolset>
    6666    <UseOfAtl>Static</UseOfAtl>
    6767    <CharacterSet>Unicode</CharacterSet>
     
    7070  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
    7171    <ConfigurationType>DynamicLibrary</ConfigurationType>
    72     <PlatformToolset>v140_xp</PlatformToolset>
     72    <PlatformToolset>v141</PlatformToolset>
    7373    <UseOfAtl>Dynamic</UseOfAtl>
    7474    <CharacterSet>Unicode</CharacterSet>
     
    105105    <LinkIncremental>true</LinkIncremental>
    106106    <IncludePath>..\..\Repository-Private\Utilities\DeflateTools\bzip2-1.0.6;$(IncludePath)</IncludePath>
     107    <PostBuildEventUseInBuild>false</PostBuildEventUseInBuild>
    107108  </PropertyGroup>
    108109  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
     
    112113    <LinkIncremental>true</LinkIncremental>
    113114    <IncludePath>..\..\Repository-Private\Utilities\DeflateTools\bzip2-1.0.6;$(IncludePath)</IncludePath>
     115    <PostBuildEventUseInBuild>false</PostBuildEventUseInBuild>
    114116  </PropertyGroup>
    115117  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
     
    180182      <AdditionalLibraryDirectories>..\..\Repository-Private\Utilities\DeflateTools\_Bin</AdditionalLibraryDirectories>
    181183    </Link>
     184    <PostBuildEvent>
     185      <Command>"$(AlaxInfo_Common)\..\Utilities\IncrementBuild\_Bin\IncrementBuild-$(PlatformName).exe" configuration "$(ProjectDir)Module.ini" binary "$(TargetPath)" string "ConfigurationName" "$(ConfigurationName)"
     186rem "$(WindowsSdkDir)bin\x64\signtool" sign /v /f "$(AlaxInfo_Common)\Certificate\PrivateSPC.pfx" /d "Alax.Info $(ProjectName) Module" /du http://alax.info /n "Roman Ryltsov" "$(TargetPath)"</Command>
     187    </PostBuildEvent>
     188    <PostBuildEvent>
     189      <Message>Build Increment, Digital Signature</Message>
     190    </PostBuildEvent>
    182191  </ItemDefinitionGroup>
    183192  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
     
    219228      <AdditionalLibraryDirectories>..\..\Repository-Private\Utilities\DeflateTools\_Bin</AdditionalLibraryDirectories>
    220229    </Link>
     230    <PostBuildEvent>
     231      <Command>"$(AlaxInfo_Common)\..\Utilities\IncrementBuild\_Bin\IncrementBuild-$(PlatformName).exe" configuration "$(ProjectDir)Module.ini" binary "$(TargetPath)" string "ConfigurationName" "$(ConfigurationName)"
     232rem "$(WindowsSdkDir)bin\x64\signtool" sign /v /f "$(AlaxInfo_Common)\Certificate\PrivateSPC.pfx" /d "Alax.Info $(ProjectName) Module" /du http://alax.info /n "Roman Ryltsov" "$(TargetPath)"</Command>
     233    </PostBuildEvent>
     234    <PostBuildEvent>
     235      <Message>Build Increment, Digital Signature</Message>
     236    </PostBuildEvent>
    221237  </ItemDefinitionGroup>
    222238  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
     
    267283      <AdditionalLibraryDirectories>..\..\Repository-Private\Utilities\DeflateTools\_Bin</AdditionalLibraryDirectories>
    268284    </Link>
     285    <PostBuildEvent>
     286      <Command>"$(AlaxInfo_Common)\..\Utilities\IncrementBuild\_Bin\IncrementBuild-$(PlatformName).exe" configuration "$(ProjectDir)Module.ini" binary "$(TargetPath)" string "ConfigurationName" "$(ConfigurationName)"
     287rem "$(WindowsSdkDir)bin\x64\signtool" sign /v /f "$(AlaxInfo_Common)\Certificate\PrivateSPC.pfx" /d "Alax.Info $(ProjectName) Module" /du http://alax.info /n "Roman Ryltsov" "$(TargetPath)"</Command>
     288    </PostBuildEvent>
     289    <PostBuildEvent>
     290      <Message>Build Increment, Digital Signature</Message>
     291    </PostBuildEvent>
    269292  </ItemDefinitionGroup>
    270293  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
     
    314337      <AdditionalLibraryDirectories>..\..\Repository-Private\Utilities\DeflateTools\_Bin</AdditionalLibraryDirectories>
    315338    </Link>
     339    <PostBuildEvent>
     340      <Command>"$(AlaxInfo_Common)\..\Utilities\IncrementBuild\_Bin\IncrementBuild-$(PlatformName).exe" configuration "$(ProjectDir)Module.ini" binary "$(TargetPath)" string "ConfigurationName" "$(ConfigurationName)"
     341rem "$(WindowsSdkDir)bin\x64\signtool" sign /v /f "$(AlaxInfo_Common)\Certificate\PrivateSPC.pfx" /d "Alax.Info $(ProjectName) Module" /du http://alax.info /n "Roman Ryltsov" "$(TargetPath)"</Command>
     342    </PostBuildEvent>
     343    <PostBuildEvent>
     344      <Message>Build Increment, Digital Signature</Message>
     345    </PostBuildEvent>
    316346  </ItemDefinitionGroup>
    317347  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Trace|Win32'">
     
    362392      <AdditionalLibraryDirectories>..\..\Repository-Private\Utilities\DeflateTools\_Bin</AdditionalLibraryDirectories>
    363393    </Link>
     394    <PostBuildEvent>
     395      <Command>"$(AlaxInfo_Common)\..\Utilities\IncrementBuild\_Bin\IncrementBuild-$(PlatformName).exe" configuration "$(ProjectDir)Module.ini" binary "$(TargetPath)" string "ConfigurationName" "$(ConfigurationName)"
     396rem "$(WindowsSdkDir)bin\x64\signtool" sign /v /f "$(AlaxInfo_Common)\Certificate\PrivateSPC.pfx" /d "Alax.Info $(ProjectName) Module" /du http://alax.info /n "Roman Ryltsov" "$(TargetPath)"</Command>
     397    </PostBuildEvent>
     398    <PostBuildEvent>
     399      <Message>Build Increment, Digital Signature</Message>
     400    </PostBuildEvent>
    364401  </ItemDefinitionGroup>
    365402  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Trace|x64'">
     
    409446      <AdditionalLibraryDirectories>..\..\Repository-Private\Utilities\DeflateTools\_Bin</AdditionalLibraryDirectories>
    410447    </Link>
     448    <PostBuildEvent>
     449      <Command>"$(AlaxInfo_Common)\..\Utilities\IncrementBuild\_Bin\IncrementBuild-$(PlatformName).exe" configuration "$(ProjectDir)Module.ini" binary "$(TargetPath)" string "ConfigurationName" "$(ConfigurationName)"
     450rem "$(WindowsSdkDir)bin\x64\signtool" sign /v /f "$(AlaxInfo_Common)\Certificate\PrivateSPC.pfx" /d "Alax.Info $(ProjectName) Module" /du http://alax.info /n "Roman Ryltsov" "$(TargetPath)"</Command>
     451    </PostBuildEvent>
     452    <PostBuildEvent>
     453      <Message>Build Increment, Digital Signature</Message>
     454    </PostBuildEvent>
    411455  </ItemDefinitionGroup>
    412456  <ItemGroup>
     
    468512    <None Include="..\..\Repository-Private\Utilities\EmailTools\_Bin\Win32\Release\EmailTools\EmailTools.tlb" />
    469513    <None Include="Module.def" />
     514    <None Include="Module.ini" />
    470515    <None Include="Module.rgs" />
    471516    <None Include="GenericClass %28Both%29.rgs" />
  • trunk/DirectShowSpy/FilterGraphList.h

    r545 r831  
    250250                        return ((CListPropertyPage*) nParameter)->SortGraphListViewItems(nItemParameter1, nItemParameter2);
    251251                }
    252                 static BOOL FindItem(CRoMapT<CStringW, CItem>& ItemMap, const CFilterGraphTable::CItem& TableItem)
    253                 {
    254                         for(auto&& MapItem: ItemMap.GetValues())
    255                         {
    256                                 if(MapItem.m_nProcessIdentifier != TableItem.m_nProcessIdentifier)
    257                                         continue;
    258                                 if(abs((LONG_PTR) MapItem.m_nInstance - (LONG_PTR) TableItem.m_nInstance) > 32) //if(MapItem.m_nInstance != TableItem.m_nInstance)
    259                                         continue;
    260                                 return TRUE;
    261                         }
    262                         return FALSE;
    263                 }
     252                #if defined(AVAILABILITY_FILTERGRAPHTABLE)
     253                        static BOOL FindItem(CRoMapT<CStringW, CItem>& ItemMap, const CFilterGraphTable::CItem& TableItem)
     254                        {
     255                                for(auto&& MapItem: ItemMap.GetValues())
     256                                {
     257                                        if(MapItem.m_nProcessIdentifier != TableItem.m_nProcessIdentifier)
     258                                                continue;
     259                                        if(abs((LONG_PTR) MapItem.m_nInstance - (LONG_PTR) TableItem.m_nInstance) > 32) //if(MapItem.m_nInstance != TableItem.m_nInstance)
     260                                                continue;
     261                                        return TRUE;
     262                                }
     263                                return FALSE;
     264                        }
     265                #endif // defined(AVAILABILITY_FILTERGRAPHTABLE)
    264266                static VOID EnumerateItems(IRunningObjectTable* pRunningObjectTable, CRoMapT<CStringW, CItem>& ItemMap, const LONG* pnProcessIdentifier = NULL)
    265267                {
     
    309311                                }
    310312                                #pragma region Filter Graph Table
    311                                 _ATLTRY
    312                                 {
    313                                         CLocalObjectPtr<CFilterGraphTable> pFilterGraphTable;
    314                                         CFilterGraphTable::CItemArray ItemArray;
    315                                         if(pFilterGraphTable->GetItems(ItemArray))
    316                                         {
    317                                                 for(auto&& TableItem: ItemArray)
     313                                #if defined(AVAILABILITY_FILTERGRAPHTABLE)
     314                                        _ATLTRY
     315                                        {
     316                                                CLocalObjectPtr<CFilterGraphTable> pFilterGraphTable;
     317                                                CFilterGraphTable::CItemArray ItemArray;
     318                                                if(pFilterGraphTable->GetItems(ItemArray))
    318319                                                {
    319                                                         if(FindItem(ItemMap, TableItem))
    320                                                                 continue;
    321                                                         if(pnProcessIdentifier && TableItem.m_nProcessIdentifier != (DWORD) *pnProcessIdentifier)
    322                                                                 continue; // Skip
    323                                                         const CStringW sDisplayName = AtlFormatStringW(L"!FilterGraph %p pid %08x; FGT", TableItem.m_nInstance, TableItem.m_nProcessIdentifier);
    324                                                         CItem Item;
    325                                                         Item.m_sDisplayName = sDisplayName;
    326                                                         Item.m_nInstance = TableItem.m_nInstance;
    327                                                         Item.m_nProcessIdentifier = TableItem.m_nProcessIdentifier;
    328                                                         Item.m_pFilterGraphUnknown = TableItem.m_pFilterGraph;
    329                                                         Item.m_pFilterGraph = TableItem.m_pFilterGraph;
    330                                                         SYSTEMTIME Time;
    331                                                         _W(FileTimeToSystemTime(&reinterpret_cast<const FILETIME&>(TableItem.m_nTime), &Time));
    332                                                         Item.m_sTime = AtlFormatString(_T("%02d:%02d:%02d"), Time.wHour, Time.wMinute, Time.wSecond);
    333                                                         _W(ItemMap.SetAt(sDisplayName, Item) >= 0);
     320                                                        for(auto&& TableItem: ItemArray)
     321                                                        {
     322                                                                if(FindItem(ItemMap, TableItem))
     323                                                                        continue;
     324                                                                if(pnProcessIdentifier && TableItem.m_nProcessIdentifier != (DWORD) *pnProcessIdentifier)
     325                                                                        continue; // Skip
     326                                                                const CStringW sDisplayName = AtlFormatStringW(L"!FilterGraph %p pid %08x; FGT", TableItem.m_nInstance, TableItem.m_nProcessIdentifier);
     327                                                                CItem Item;
     328                                                                Item.m_sDisplayName = sDisplayName;
     329                                                                Item.m_nInstance = TableItem.m_nInstance;
     330                                                                Item.m_nProcessIdentifier = TableItem.m_nProcessIdentifier;
     331                                                                Item.m_pFilterGraphUnknown = TableItem.m_pFilterGraph;
     332                                                                Item.m_pFilterGraph = TableItem.m_pFilterGraph;
     333                                                                SYSTEMTIME Time;
     334                                                                _W(FileTimeToSystemTime(&reinterpret_cast<const FILETIME&>(TableItem.m_nTime), &Time));
     335                                                                Item.m_sTime = AtlFormatString(_T("%02d:%02d:%02d"), Time.wHour, Time.wMinute, Time.wSecond);
     336                                                                _W(ItemMap.SetAt(sDisplayName, Item) >= 0);
     337                                                        }
    334338                                                }
    335339                                        }
    336                                 }
    337                                 _ATLCATCHALL()
    338                                 {
    339                                         _Z_EXCEPTION();
    340                                 }
     340                                        _ATLCATCHALL()
     341                                        {
     342                                                _Z_EXCEPTION();
     343                                        }
     344                                #endif // defined(AVAILABILITY_FILTERGRAPHTABLE)
    341345                                #pragma endregion
    342346                        }
  • trunk/DirectShowSpy/FilterGraphSpy.h

    r617 r831  
    191191        public IDispatchImpl<ISpy>,
    192192        public ISpyEx,
    193         public IFilterGraph2,
     193        public IFilterGraph3,
    194194        public IDispatchImpl<IMediaControl, &__uuidof(IMediaControl), &__uuidof(Quartz::__QuartzTypeLib)>,
    195195        public IMediaEventSink,
     
    227227        COM_INTERFACE_ENTRY(ISpyEx)
    228228        COM_INTERFACE_ENTRY(IFilterGraph2)
     229        COM_INTERFACE_ENTRY(IFilterGraph3)
    229230        COM_INTERFACE_ENTRY(IGraphBuilder)
    230231        COM_INTERFACE_ENTRY(IFilterGraph)
     
    627628        _FilterGraphHelper::CRotRunningFilterGraph m_RunningFilterGraph;
    628629        INT m_nRunningFilterGraphReference;
    629         CLocalObjectPtr<CFilterGraphTableItem> m_pFilterGraphTableItem;
     630        #if defined(AVAILABILITY_FILTERGRAPHTABLE)
     631                CLocalObjectPtr<CFilterGraphTableItem> m_pFilterGraphTableItem;
     632        #endif // defined(AVAILABILITY_FILTERGRAPHTABLE)
    630633        SYSTEMTIME m_Time;
    631634        CStringW m_sMonikerDisplayName;
     
    675678                }
    676679                #pragma region Filter Graph Table Item
    677                 static CConstIntegerRegistryValue g_nAutomaticFilterGraphTableItem(_T("Automatic Filter Graph Table Item")); // 0 Default (Disabled), 1 Disabled, 2 Enabled
    678                 if(g_nAutomaticFilterGraphTableItem == 2) // Enabled
    679                         _ATLTRY
    680                         {
    681                                 _A(!m_pFilterGraphTableItem->IsFilterGraphAvailable());
    682                                 m_pFilterGraphTableItem->SetFilterGraph(this);
    683                                 Release();
    684                         }
    685                         _ATLCATCHALL()
    686                         {
    687                                 _Z_EXCEPTION();
    688                         }
     680                #if defined(AVAILABILITY_FILTERGRAPHTABLE)
     681                        static CConstIntegerRegistryValue g_nAutomaticFilterGraphTableItem(_T("Automatic Filter Graph Table Item")); // 0 Default (Disabled), 1 Disabled, 2 Enabled
     682                        if(g_nAutomaticFilterGraphTableItem == 2) // Enabled
     683                                _ATLTRY
     684                                {
     685                                        _A(!m_pFilterGraphTableItem->IsFilterGraphAvailable());
     686                                        m_pFilterGraphTableItem->SetFilterGraph(this);
     687                                        Release();
     688                                }
     689                                _ATLCATCHALL()
     690                                {
     691                                        _Z_EXCEPTION();
     692                                }
     693                #endif // defined(AVAILABILITY_FILTERGRAPHTABLE)
    689694                #pragma endregion
    690695                if(!m_bIsAggregated)
     
    706711                        return;
    707712                #pragma region Filter Graph Table Item
    708                 _ATLTRY
    709                 {
    710                         if(m_pFilterGraphTableItem->IsFilterGraphAvailable())
    711                         {
    712                                 AddRef();
    713                                 m_pFilterGraphTableItem->SetFilterGraph(NULL);
    714                         }
    715                 }
    716                 _ATLCATCHALL()
    717                 {
    718                         _Z_EXCEPTION();
    719                 }
     713                #if defined(AVAILABILITY_FILTERGRAPHTABLE)
     714                        _ATLTRY
     715                        {
     716                                if(m_pFilterGraphTableItem->IsFilterGraphAvailable())
     717                                {
     718                                        AddRef();
     719                                        m_pFilterGraphTableItem->SetFilterGraph(NULL);
     720                                }
     721                        }
     722                        _ATLCATCHALL()
     723                        {
     724                                _Z_EXCEPTION();
     725                        }
     726                #endif // defined(AVAILABILITY_FILTERGRAPHTABLE)
    720727                #pragma endregion
    721728                if(m_nRunningFilterGraphReference != 2)
    722729                        AddRef();
    723                 _Z4(atlTraceRefcount, 4, _T("this 0x%p, m_dwRef 0x%x\n"), this, m_dwRef);
     730                _Z4(atlTraceRefcount, 4, _T("this 0x%p, m_dwRef 0x%X\n"), this, m_dwRef);
    724731                m_RunningFilterGraph.SetFilterGraph(NULL);
    725732                {
     
    727734                        m_sMonikerDisplayName.Empty();
    728735                }
    729                 _Z4(atlTraceRefcount, 4, _T("this 0x%p, m_dwRef 0x%x\n"), this, m_dwRef);
     736                _Z4(atlTraceRefcount, 4, _T("this 0x%p, m_dwRef 0x%X\n"), this, m_dwRef);
    730737        }
    731738        HRESULT InternalQueryFilterGraph3Interface(REFIID InterfaceIdentifier, VOID** ppvObject)
     
    807814                                #pragma region Instantiation
    808815                                {
    809                                         { const ULONG nAddRefCount = pControllingUnknown.p->AddRef(); const ULONG nReleaseCount = pControllingUnknown.p->Release(); _Z5(atlTraceRefcount, 5, _T("m_dwRef 0x%x, AddRef %d, Release %d\n"), m_dwRef, nAddRefCount, nReleaseCount); }
     816                                        { const ULONG nAddRefCount = pControllingUnknown.p->AddRef(); const ULONG nReleaseCount = pControllingUnknown.p->Release(); _Z5(atlTraceRefcount, 5, _T("m_dwRef 0x%X, AddRef %d, Release %d\n"), m_dwRef, nAddRefCount, nReleaseCount); }
    810817                                        const CComPtr<IUnknown> pUnknown = CoCreateOriginalInstance(hModule, pControllingUnknown);
    811818                                        // NOTE: DirectShow FilterGraph is incorrectly implementing COM aggregation adding outer reference to interfaces queried from private IUnknown
     
    826833                                        pMediaEventEx.p->Release();
    827834                                        #pragma region ROT Registration
    828                                         { const ULONG nAddRefCount = pControllingUnknown.p->AddRef(); const ULONG nReleaseCount = pControllingUnknown.p->Release(); _Z5(atlTraceRefcount, 5, _T("m_dwRef 0x%x, AddRef %d, Release %d\n"), m_dwRef, nAddRefCount, nReleaseCount); }
     835                                        { const ULONG nAddRefCount = pControllingUnknown.p->AddRef(); const ULONG nReleaseCount = pControllingUnknown.p->Release(); _Z5(atlTraceRefcount, 5, _T("m_dwRef 0x%X, AddRef %d, Release %d\n"), m_dwRef, nAddRefCount, nReleaseCount); }
    829836                                        SetRunningFilterGraph();
    830                                         { const ULONG nAddRefCount = pControllingUnknown.p->AddRef(); const ULONG nReleaseCount = pControllingUnknown.p->Release(); _Z5(atlTraceRefcount, 5, _T("m_dwRef 0x%x, AddRef %d, Release %d\n"), m_dwRef, nAddRefCount, nReleaseCount); }
     837                                        { const ULONG nAddRefCount = pControllingUnknown.p->AddRef(); const ULONG nReleaseCount = pControllingUnknown.p->Release(); _Z5(atlTraceRefcount, 5, _T("m_dwRef 0x%X, AddRef %d, Release %d\n"), m_dwRef, nAddRefCount, nReleaseCount); }
    831838                                        #pragma endregion
    832839                                        m_pInnerUnknown = pUnknown;
     
    905912        VOID FinalRelease()
    906913        {
    907                 _Z5(atlTraceRefcount, 5, _T("m_dwRef 0x%x\n"), m_dwRef);
     914                _Z5(atlTraceRefcount, 5, _T("m_dwRef 0x%X\n"), m_dwRef);
    908915                _A(!m_pTemporaryUnknown);
    909916                const CComPtr<IUnknown> pControllingUnknown = GetControllingUnknown();
     
    10111018
    10121019// ISpy
    1013     STDMETHOD(get_MonikerDisplayName)(BSTR* psMonikerDisplayName)
     1020    STDMETHOD(get_MonikerDisplayName)(BSTR* psMonikerDisplayName) override
    10141021        {
    10151022                _Z4(atlTraceCOM, 4, _T("this 0x%p\n"), this);
     
    10251032                return S_OK;
    10261033        }
    1027         STDMETHOD(get_CreationTime)(DATE* pfTime)
     1034        STDMETHOD(get_CreationTime)(DATE* pfTime) override
    10281035        {
    10291036                _Z4(atlTraceCOM, 4, _T("this 0x%p\n"), this);
     
    10451052                return S_OK;
    10461053        }
    1047         STDMETHOD(get_FriendlyName)(BSTR* psFriendlyName)
     1054        STDMETHOD(get_FriendlyName)(BSTR* psFriendlyName) override
    10481055        {
    10491056                _Z4(atlTraceCOM, 4, _T("this 0x%p\n"), this);
     
    10601067                return S_OK;
    10611068        }
    1062         STDMETHOD(put_FriendlyName)(BSTR sFriendlyName)
     1069        STDMETHOD(put_FriendlyName)(BSTR sFriendlyName) override
    10631070        {
    10641071                _Z4(atlTraceCOM, 4, _T("this 0x%p, sFriendlyName \"%s\"\n"), this, CString(sFriendlyName));
     
    10741081                return S_OK;
    10751082        }
    1076         STDMETHOD(DoPropertyFrameModal)(LONG nParentWindowHandle)
     1083        STDMETHOD(DoPropertyFrameModal)(LONG nParentWindowHandle) override
    10771084        {
    10781085                _Z4(atlTraceCOM, 4, _T("this 0x%p, nParentWindowHandle 0x%08X\n"), this, nParentWindowHandle);
     
    10881095                return S_OK;
    10891096        }
    1090         STDMETHOD(DoFilterGraphListModal)(LONG nParentWindowHandle)
     1097        STDMETHOD(DoFilterGraphListModal)(LONG nParentWindowHandle) override
    10911098        {
    10921099                _Z4(atlTraceCOM, 4, _T("this 0x%p, nParentWindowHandle 0x%08X\n"), this, nParentWindowHandle);
     
    11011108                return S_OK;
    11021109        }
    1103         STDMETHOD(OpenGraphStudioNext)(LONG nParentWindowHandle, VARIANT_BOOL* pbResult)
     1110        STDMETHOD(OpenGraphStudioNext)(LONG nParentWindowHandle, VARIANT_BOOL* pbResult) override
    11041111        {
    11051112                _Z4(atlTraceCOM, 4, _T("this 0x%p, nParentWindowHandle 0x%08X\n"), this, nParentWindowHandle);
     
    11141121                return S_OK;
    11151122        }
    1116         STDMETHOD(OpenGraphEdit)(LONG nParentWindowHandle, VARIANT_BOOL* pbResult)
     1123        STDMETHOD(OpenGraphEdit)(LONG nParentWindowHandle, VARIANT_BOOL* pbResult) override
    11171124        {
    11181125                _Z4(atlTraceCOM, 4, _T("this 0x%p, nParentWindowHandle 0x%08X\n"), this, nParentWindowHandle);
     
    11271134                return S_OK;
    11281135        }
    1129         STDMETHOD(ReadRunPropertyBag)(IUnknown* pBaseFilterUnknown, VARIANT_BOOL bAllowExtension, VARIANT* pvValue)
     1136        STDMETHOD(ReadRunPropertyBag)(IUnknown* pBaseFilterUnknown, VARIANT_BOOL bAllowExtension, VARIANT* pvValue) override
    11301137        {
    11311138                _Z4(atlTraceCOM, 4, _T("this 0x%p, pBaseFilterUnknown 0x%p, bAllowExtension %d\n"), this, pBaseFilterUnknown, bAllowExtension);
     
    11431150                return S_OK;
    11441151        }
    1145         STDMETHOD(CreateMediaSampleTrace)(IMediaSampleTrace** ppMediaSampleTrace)
     1152        STDMETHOD(CreateMediaSampleTrace)(IMediaSampleTrace** ppMediaSampleTrace) override
    11461153        {
    11471154                _Z4(atlTraceCOM, 4, _T("this 0x%p\n"), this);
     
    11641171
    11651172// IFilterGraph
    1166         STDMETHOD(AddFilter)(IBaseFilter* pBaseFilter, LPCWSTR pszName)
     1173        STDMETHOD(AddFilter)(IBaseFilter* pBaseFilter, LPCWSTR pszName) override
    11671174        {
    11681175                _Z4(atlTraceCOM, 4, _T("this 0x%p, pBaseFilter 0x%p %ls, pszName \"%s\"\n"), this, pBaseFilter, _FilterGraphHelper::GetFilterClassIdentifierString(pBaseFilter), CString(pszName));
     
    11841191                return nResult;
    11851192        }
    1186     STDMETHOD(RemoveFilter)(IBaseFilter* pBaseFilter)
     1193    STDMETHOD(RemoveFilter)(IBaseFilter* pBaseFilter) override
    11871194        {
    11881195                _Z4(atlTraceCOM, 4, _T("this 0x%p, pBaseFilter 0x%p\n"), this, pBaseFilter);
     
    12021209                return m_pInnerFilterGraph2->RemoveFilter(pBaseFilter);
    12031210        }
    1204     STDMETHOD(EnumFilters)(IEnumFilters** ppEnumFilters)
    1205         {
    1206                 _Z4(atlTraceCOM, 4, _T("...\n"));
     1211    STDMETHOD(EnumFilters)(IEnumFilters** ppEnumFilters) override
     1212        {
     1213                _Z4(atlTraceCOM, 4, _T("this 0x%p\n"), this);
    12071214                return m_pInnerFilterGraph2->EnumFilters(ppEnumFilters);
    12081215        }
    1209     STDMETHOD(FindFilterByName)(LPCWSTR pszName, IBaseFilter** ppFilter)
    1210         {
    1211                 _Z4(atlTraceCOM, 4, _T("pszName \"%s\"\n"), CString(pszName));
     1216    STDMETHOD(FindFilterByName)(LPCWSTR pszName, IBaseFilter** ppFilter) override
     1217        {
     1218                _Z4(atlTraceCOM, 4, _T("this 0x%p, pszName \"%s\"\n"), this, CString(pszName));
    12121219                return m_pInnerFilterGraph2->FindFilterByName(pszName, ppFilter);
    12131220        }
    1214     STDMETHOD(ConnectDirect)(IPin* pOutputPin, IPin* pInputPin, const AM_MEDIA_TYPE* pMediaType)
    1215         {
    1216                 _Z4(atlTraceCOM, 4, _T("...\n"));
     1221    STDMETHOD(ConnectDirect)(IPin* pOutputPin, IPin* pInputPin, const AM_MEDIA_TYPE* pMediaType) override
     1222        {
     1223                _Z4(atlTraceCOM, 4, _T("this 0x%p\n"), this);
    12171224                if(pOutputPin && pInputPin)
    12181225                        _ATLTRY
     
    12661273                return nConnectDirectResult;
    12671274        }
    1268     STDMETHOD(Reconnect)(IPin* pPin)
    1269         {
    1270                 _Z4(atlTraceCOM, 4, _T("...\n"));
     1275    STDMETHOD(Reconnect)(IPin* pPin) override
     1276        {
     1277                _Z4(atlTraceCOM, 4, _T("this 0x%p\n"), this);
    12711278                HOOK_PROLOG(CFilterGraphConnectHookHost)
    12721279                        OnReconnect(pT, pPin, &bDefault);
     
    12741281                return m_pInnerFilterGraph2->Reconnect(pPin);
    12751282        }
    1276     STDMETHOD(Disconnect)(IPin* pPin)
    1277         {
    1278                 _Z4(atlTraceCOM, 4, _T("...\n"));
     1283    STDMETHOD(Disconnect)(IPin* pPin) override
     1284        {
     1285                _Z4(atlTraceCOM, 4, _T("this 0x%p\n"), this);
    12791286                HOOK_PROLOG(CFilterGraphConnectHookHost)
    12801287                        OnDisconnect(pT, pPin, &bDefault);
     
    12821289                return m_pInnerFilterGraph2->Disconnect(pPin);
    12831290        }
    1284     STDMETHOD(SetDefaultSyncSource)()
    1285         {
    1286                 _Z4(atlTraceCOM, 4, _T("...\n"));
     1291    STDMETHOD(SetDefaultSyncSource)() override
     1292        {
     1293                _Z4(atlTraceCOM, 4, _T("this 0x%p\n"), this);
    12871294                return m_pInnerFilterGraph2->SetDefaultSyncSource();
    12881295        }
    12891296
    12901297// IGraphBuilder
    1291     STDMETHOD(Connect)(IPin* pOutputPin, IPin* pInputPin)
    1292         {
    1293                 _Z4(atlTraceCOM, 4, _T("pOutputPin 0x%p, pInputPin 0x%p\n"), pOutputPin, pInputPin);
     1298    STDMETHOD(Connect)(IPin* pOutputPin, IPin* pInputPin) override
     1299        {
     1300                _Z4(atlTraceCOM, 4, _T("this 0x%p, pOutputPin 0x%p, pInputPin 0x%p\n"), this, pOutputPin, pInputPin);
    12941301                if(pOutputPin && pInputPin)
    12951302                        _ATLTRY
    12961303                        {
    1297                                 _Z4(atlTraceGeneral, 4, _T("this 0x%p, pOutputPin 0x%p \"%ls\" (filter 0x%p), pInputPin 0x%p \"%ls\" (filter 0x%p)\n"), this,
     1304                                _Z4(atlTraceGeneral, 4, _T("pOutputPin 0x%p \"%ls\" (filter 0x%p), pInputPin 0x%p \"%ls\" (filter 0x%p)\n"),
    12981305                                        pOutputPin, _FilterGraphHelper::GetPinFullName(pOutputPin), _FilterGraphHelper::GetPinFilter(pOutputPin),
    12991306                                        pInputPin, _FilterGraphHelper::GetPinFullName(pInputPin), _FilterGraphHelper::GetPinFilter(pInputPin),
     
    13111318                return nConnectResult;
    13121319        }
    1313     STDMETHOD(Render)(IPin* pOutputPin)
    1314         {
    1315                 _Z4(atlTraceCOM, 4, _T("...\n"));
     1320    STDMETHOD(Render)(IPin* pOutputPin) override
     1321        {
     1322                _Z4(atlTraceCOM, 4, _T("this 0x%p\n"), this);
    13161323                return m_pInnerFilterGraph2->Render(pOutputPin);
    13171324        }
    1318     STDMETHOD(RenderFile)(LPCWSTR pszFileName, LPCWSTR pszPlayListFileName)
    1319         {
    1320                 _Z4(atlTraceCOM, 4, _T("pszFileName \"%s\", pszPlayListFileName \"%s\"\n"), CString(pszFileName), CString(pszPlayListFileName));
     1325    STDMETHOD(RenderFile)(LPCWSTR pszFileName, LPCWSTR pszPlayListFileName) override
     1326        {
     1327                _Z4(atlTraceCOM, 4, _T("this 0x%p, pszFileName \"%s\", pszPlayListFileName \"%s\"\n"), this, CString(pszFileName), CString(pszPlayListFileName));
    13211328                return m_pInnerFilterGraph2->RenderFile(pszFileName, pszPlayListFileName);
    13221329        }
    1323     STDMETHOD(AddSourceFilter)(LPCWSTR pszFileName, LPCWSTR pszFilterName, IBaseFilter** ppBaseFilter)
    1324         {
    1325                 _Z4(atlTraceCOM, 4, _T("pszFileName \"%s\", pszFilterName \"%s\"\n"), CString(pszFileName), CString(pszFilterName));
     1330    STDMETHOD(AddSourceFilter)(LPCWSTR pszFileName, LPCWSTR pszFilterName, IBaseFilter** ppBaseFilter) override
     1331        {
     1332                _Z4(atlTraceCOM, 4, _T("this 0x%p, pszFileName \"%s\", pszFilterName \"%s\"\n"), this, CString(pszFileName), CString(pszFilterName));
    13261333                ReleaseTemporaryUnknown();
    13271334                HOOK_PROLOG(CFilterGraphAddRemoveHookHost)
     
    13301337                return m_pInnerFilterGraph2->AddSourceFilter(pszFileName, pszFilterName, ppBaseFilter);
    13311338        }
    1332         STDMETHOD(SetLogFile)(DWORD_PTR hFile)
    1333         {
    1334                 _Z4(atlTraceCOM, 4, _T("...\n"));
     1339        STDMETHOD(SetLogFile)(DWORD_PTR hFile) override
     1340        {
     1341                _Z4(atlTraceCOM, 4, _T("this 0x%p\n"), this);
    13351342                return m_pInnerFilterGraph2->SetLogFile(hFile);
    13361343        }
    1337         STDMETHOD(Abort)()
    1338         {
    1339                 _Z4(atlTraceCOM, 4, _T("...\n"));
     1344        STDMETHOD(Abort)() override
     1345        {
     1346                _Z4(atlTraceCOM, 4, _T("this 0x%p\n"), this);
    13401347                return m_pInnerFilterGraph2->Abort();
    13411348        }
    1342         STDMETHOD(ShouldOperationContinue)()
    1343         {
    1344                 _Z4(atlTraceCOM, 4, _T("...\n"));
     1349        STDMETHOD(ShouldOperationContinue)() override
     1350        {
     1351                _Z4(atlTraceCOM, 4, _T("this 0x%p\n"), this);
    13451352                return m_pInnerFilterGraph2->ShouldOperationContinue();
    13461353        }
    13471354
    13481355// IFilterGraph2
    1349         STDMETHOD(AddSourceFilterForMoniker)(IMoniker* pMoniker, IBindCtx* pBindCtx, LPCWSTR pszFilterName, IBaseFilter** ppBaseFilter)
    1350         {
    1351                 _Z4(atlTraceCOM, 4, _T("pszFilterName \"%s\"\n"), CString(pszFilterName));
     1356        STDMETHOD(AddSourceFilterForMoniker)(IMoniker* pMoniker, IBindCtx* pBindCtx, LPCWSTR pszFilterName, IBaseFilter** ppBaseFilter) override
     1357        {
     1358                _Z4(atlTraceCOM, 4, _T("this 0x%p, pszFilterName \"%s\"\n"), this, CString(pszFilterName));
    13521359                ReleaseTemporaryUnknown();
    13531360                HOOK_PROLOG(CFilterGraphAddRemoveHookHost)
     
    13561363                return m_pInnerFilterGraph2->AddSourceFilterForMoniker(pMoniker, pBindCtx, pszFilterName, ppBaseFilter);
    13571364        }
    1358         STDMETHOD(ReconnectEx)(IPin* pPin, const AM_MEDIA_TYPE* pMediaType)
    1359         {
    1360                 _Z4(atlTraceCOM, 4, _T("...\n"));
     1365        STDMETHOD(ReconnectEx)(IPin* pPin, const AM_MEDIA_TYPE* pMediaType) override
     1366        {
     1367                _Z4(atlTraceCOM, 4, _T("this 0x%p\n"), this);
    13611368                HOOK_PROLOG(CFilterGraphConnectHookHost)
    13621369                        OnReconnectEx(pT, pPin, (const BYTE*) pMediaType, &bDefault);
     
    13641371                return m_pInnerFilterGraph2->ReconnectEx(pPin, pMediaType);
    13651372        }
    1366         STDMETHOD(RenderEx)(IPin* pOutputPin, DWORD nFlags, DWORD* pnContext)
    1367         {
    1368                 _Z4(atlTraceCOM, 4, _T("nFlags 0x%x\n"), nFlags);
     1373        STDMETHOD(RenderEx)(IPin* pOutputPin, DWORD nFlags, DWORD* pnContext) override
     1374        {
     1375                _Z4(atlTraceCOM, 4, _T("this 0x%p, nFlags 0x%X\n"), this, nFlags);
    13691376                return m_pInnerFilterGraph2->RenderEx(pOutputPin, nFlags, pnContext);
    13701377        }
    13711378
    13721379// IFilterGraph3
    1373     STDMETHOD(SetSyncSourceEx)(IReferenceClock* pFilterGraphReferenceClock, IReferenceClock* pFilterReferenceClock, IBaseFilter* pBaseFilter)
    1374         {
    1375                 _Z4(atlTraceCOM, 4, _T("...\n"));
     1380    STDMETHOD(SetSyncSourceEx)(IReferenceClock* pFilterGraphReferenceClock, IReferenceClock* pFilterReferenceClock, IBaseFilter* pBaseFilter) override
     1381        {
     1382                _Z4(atlTraceCOM, 4, _T("this 0x%p\n"), this);
    13761383                _A(m_pInnerFilterGraph3);
    13771384                return m_pInnerFilterGraph3->SetSyncSourceEx(pFilterGraphReferenceClock, pFilterReferenceClock, pBaseFilter);
     
    13791386
    13801387// IMediaControl
    1381         STDMETHOD(Run)()
    1382         {
    1383                 _Z4(atlTraceCOM, 4, _T("...\n"));
     1388        STDMETHOD(Run)() override
     1389        {
     1390                _Z4(atlTraceCOM, 4, _T("this 0x%p\n"), this);
    13841391                _ATLTRY
    13851392                {
     
    13991406                return nRunResult;
    14001407        }
    1401         STDMETHOD(Pause)()
    1402         {
    1403                 _Z4(atlTraceCOM, 4, _T("...\n"));
     1408        STDMETHOD(Pause)() override
     1409        {
     1410                _Z4(atlTraceCOM, 4, _T("this 0x%p\n"), this);
    14041411                _ATLTRY
    14051412                {
     
    14171424                return m_pInnerMediaControl->Pause();
    14181425        }
    1419         STDMETHOD(Stop)()
    1420         {
    1421                 _Z4(atlTraceCOM, 4, _T("...\n"));
     1426        STDMETHOD(Stop)() override
     1427        {
     1428                _Z4(atlTraceCOM, 4, _T("this 0x%p\n"), this);
    14221429                HOOK_PROLOG(CFilterGraphStateControlHookHost)
    14231430                        OnStop(pT, &bDefault);
     
    14251432                return m_pInnerMediaControl->Stop();
    14261433        }
    1427         STDMETHOD(GetState)(LONG nTimeout, OAFilterState* pState)
    1428         {
    1429                 _Z5(atlTraceCOM, 5, _T("nTimeout %d\n"), nTimeout);
     1434        STDMETHOD(GetState)(LONG nTimeout, OAFilterState* pState) override
     1435        {
     1436                _Z5(atlTraceCOM, 5, _T("this 0x%p, nTimeout %d\n"), this, nTimeout);
    14301437                return m_pInnerMediaControl->GetState(nTimeout, pState);
    14311438        }
    1432         STDMETHOD(RenderFile)(BSTR sFileName)
    1433         {
    1434                 _Z4(atlTraceCOM, 4, _T("sFileName \"%s\"\n"), CString(sFileName));
     1439        STDMETHOD(RenderFile)(BSTR sFileName) override
     1440        {
     1441                _Z4(atlTraceCOM, 4, _T("this 0x%p, sFileName \"%s\"\n"), this, CString(sFileName));
    14351442                return m_pInnerMediaControl->RenderFile(sFileName);
    14361443        }
    1437     STDMETHOD(AddSourceFilter)(BSTR sFileName, IDispatch** ppDispatch)
    1438         {
    1439                 _Z4(atlTraceCOM, 4, _T("sFileName \"%s\"\n"), CString(sFileName));
     1444    STDMETHOD(AddSourceFilter)(BSTR sFileName, IDispatch** ppDispatch) override
     1445        {
     1446                _Z4(atlTraceCOM, 4, _T("this 0x%p, sFileName \"%s\"\n"), this, CString(sFileName));
    14401447                ReleaseTemporaryUnknown();
    14411448                _ATLTRY
     
    14631470                return m_pInnerMediaControl->AddSourceFilter(sFileName, ppDispatch);
    14641471        }
    1465         STDMETHOD(get_FilterCollection)(IDispatch** ppDispatch)
    1466         {
    1467                 _Z4(atlTraceCOM, 4, _T("...\n"));
     1472        STDMETHOD(get_FilterCollection)(IDispatch** ppDispatch) override
     1473        {
     1474                _Z4(atlTraceCOM, 4, _T("this 0x%p\n"), this);
    14681475                ReleaseTemporaryUnknown();
    14691476                return m_pInnerMediaControl->get_FilterCollection(ppDispatch);
    14701477        }
    1471         STDMETHOD(get_RegFilterCollection)(IDispatch** ppDispatch)
    1472         {
    1473                 _Z4(atlTraceCOM, 4, _T("...\n"));
     1478        STDMETHOD(get_RegFilterCollection)(IDispatch** ppDispatch) override
     1479        {
     1480                _Z4(atlTraceCOM, 4, _T("this 0x%p\n"), this);
    14741481                ReleaseTemporaryUnknown();
    14751482                return m_pInnerMediaControl->get_RegFilterCollection(ppDispatch);
    14761483        }
    1477         STDMETHOD(StopWhenReady)()
    1478         {
    1479                 _Z4(atlTraceCOM, 4, _T("...\n"));
     1484        STDMETHOD(StopWhenReady)() override
     1485        {
     1486                _Z4(atlTraceCOM, 4, _T("this 0x%p\n"), this);
    14801487                return m_pInnerMediaControl->StopWhenReady();
    14811488        }
    14821489
    14831490// IMediaEventSink
    1484     STDMETHOD(Notify)(LONG nEventCode, LONG_PTR nParameter1, LONG_PTR nParameter2)
    1485         {
    1486                 _Z4(atlTraceCOM, 4, _T("nEventCode %s, nParameter1 0x%p, nParameter2 0x%p\n"), _FilterGraphHelper::FormatEventCode(nEventCode), nParameter1, nParameter2);
    1487                 //#if defined(_M_IX86)
    1488                         // WARN: Guarding section around might be preventing from walking frame up the stack
    1489                         // WARN: No guarding section however might cause hosting application crash, within RtlCaptureContext API unfortunately
    1490                         if(nEventCode == EC_ERRORABORT) // || nEventCode == EC_VIDEO_SIZE_CHANGED)
    1491                                 _ATLTRY
     1491    STDMETHOD(Notify)(LONG nEventCode, LONG_PTR nParameter1, LONG_PTR nParameter2) override
     1492        {
     1493                _Z4(atlTraceCOM, 4, _T("this 0x%p, nEventCode %s, nParameter1 0x%p, nParameter2 0x%p\n"), this, _FilterGraphHelper::FormatEventCode(nEventCode), nParameter1, nParameter2);
     1494                #pragma region EC_COMPLETE
     1495                if(nEventCode == EC_COMPLETE)
     1496                        _ATLTRY
     1497                        {
     1498                                IBaseFilter* pBaseFilter = (IBaseFilter*) nParameter2;
     1499                                if(pBaseFilter)
    14921500                                {
    1493                                         CONTEXT ThreadContext = { CONTEXT_FULL };
    1494                                         GetCurrentThreadContext(&ThreadContext);
    1495                                         CDebugTraceCallStack::TraceCallStack(ThreadContext, 32); //(nEventCode == EC_ERRORABORT) ? 32 : 8);
     1501                                        const CStringW sName = _FilterGraphHelper::GetFilterName(pBaseFilter);
     1502                                        _Z3(atlTraceCOM, 3, _T("Received EC_COMPLETE from filter 0x%p \"%ls\"\n"), pBaseFilter, sName);
    14961503                                }
    1497                                 _ATLCATCHALL()
    1498                                 {
    1499                                         _Z_EXCEPTION();
    1500                                 }
    1501                         if(nEventCode == EC_COMPLETE)
    1502                                 _ATLTRY
    1503                                 {
    1504                                         IBaseFilter* pBaseFilter = (IBaseFilter*) nParameter2;
    1505                                         if(pBaseFilter)
    1506                                         {
    1507                                                 const CStringW sName = _FilterGraphHelper::GetFilterName(pBaseFilter);
    1508                                                 _Z3(atlTraceCOM, 3, _T("Received EC_COMPLETE from filter 0x%p \"%ls\"\n"), pBaseFilter, sName);
    1509                                         }
    1510                                 }
    1511                                 _ATLCATCHALL()
    1512                                 {
    1513                                         _Z_EXCEPTION();
    1514                                 }
    1515                 //#endif // defined(_M_IX86)
     1504                                //TCHAR pszComment[64];
     1505                                //_stprintf_s(pszComment, _T("DirectShow-Complete-0x%08X"), (HRESULT) nParameter1);
     1506                                //TryWriteMiniDump(pszComment);
     1507                        }
     1508                        _ATLCATCHALL()
     1509                        {
     1510                                _Z_EXCEPTION();
     1511                        }
     1512                #pragma endregion
     1513                #pragma region EC_ERRORABORT, EC_ERRORABORTEX
     1514                if(nEventCode == EC_ERRORABORT || nEventCode == EC_ERRORABORTEX)
     1515                {
     1516                        if(nEventCode == EC_ERRORABORTEX && nParameter2)
     1517                                _Z4(atlTraceGeneral, 4, _T("nParameter2 \"%s\"\n"), CString((BSTR) nParameter2));
     1518                        static CConstIntegerRegistryValue g_nErrorAbortMiniDumpMode(_T("ErrorAbort MiniDump Mode")); // 0 Default (=1), 1 Disabled, 2 Enabled
     1519                        if((DWORD) g_nErrorAbortMiniDumpMode == 2) // Enabled
     1520                        {
     1521                                TCHAR pszComment[64];
     1522                                _stprintf_s(pszComment, _T("DirectShow-ErrorAbort-0x%08X"), (HRESULT) nParameter1);
     1523                                static LONG g_nCounter = 0;
     1524                                TryWriteMiniDump(pszComment, &g_nCounter);
     1525                        }
     1526                }
     1527                #pragma endregion
    15161528                if(!m_pInnerMediaEventSink)
    15171529                        return S_FALSE;
     
    15201532
    15211533// IMediaEvent
    1522         STDMETHOD(GetEventHandle)(OAEVENT* pnEventHandle)
    1523         {
    1524                 _Z4(atlTraceCOM, 4, _T("...\n"));
     1534        STDMETHOD(GetEventHandle)(OAEVENT* pnEventHandle) override
     1535        {
     1536                _Z4(atlTraceCOM, 4, _T("this 0x%p\n"), this);
    15251537                return m_pInnerMediaEventEx->GetEventHandle(pnEventHandle);
    15261538        }
    1527         STDMETHOD(GetEvent)(LONG* pnEventCode, LONG_PTR* pnParameter1, LONG_PTR* pnParameter2, LONG nTimeout)
    1528         {
    1529                 _Z4(atlTraceCOM, nTimeout ? 4 : 5, _T("nTimeout %d\n"), nTimeout);
     1539        STDMETHOD(GetEvent)(LONG* pnEventCode, LONG_PTR* pnParameter1, LONG_PTR* pnParameter2, LONG nTimeout) override
     1540        {
     1541                _Z4(atlTraceCOM, nTimeout ? 4 : 5, _T("this 0x%p, nTimeout %d\n"), this, nTimeout);
    15301542                const HRESULT nGetEventResult = m_pInnerMediaEventEx->GetEvent(pnEventCode, pnParameter1, pnParameter2, nTimeout);
    15311543                if(pnEventCode && pnParameter1 && pnParameter2)
     
    15331545                return nGetEventResult;
    15341546        }
    1535         STDMETHOD(WaitForCompletion)(LONG nTimeout, LONG* pnEventCode)
    1536         {
    1537                 _Z4(atlTraceCOM, 4, _T("nTimeout %d\n"), nTimeout);
     1547        STDMETHOD(WaitForCompletion)(LONG nTimeout, LONG* pnEventCode) override
     1548        {
     1549                _Z4(atlTraceCOM, 4, _T("this 0x%p, nTimeout %d\n"), this, nTimeout);
    15381550                const HRESULT nWaitForCompletionResult = m_pInnerMediaEventEx->WaitForCompletion(nTimeout, pnEventCode);
    15391551                if(pnEventCode)
     
    15411553                return nWaitForCompletionResult;
    15421554        }
    1543         STDMETHOD(CancelDefaultHandling)(LONG nEventCode)
    1544         {
    1545                 _Z4(atlTraceCOM, 4, _T("nEventCode %s\n"), _FilterGraphHelper::FormatEventCode(nEventCode));
     1555        STDMETHOD(CancelDefaultHandling)(LONG nEventCode) override
     1556        {
     1557                _Z4(atlTraceCOM, 4, _T("this 0x%p, nEventCode %s\n"), this, _FilterGraphHelper::FormatEventCode(nEventCode));
    15461558                return m_pInnerMediaEventEx->CancelDefaultHandling(nEventCode);
    15471559        }
    1548         STDMETHOD(RestoreDefaultHandling)(LONG nEventCode)
    1549         {
    1550                 _Z4(atlTraceCOM, 4, _T("nEventCode %s\n"), _FilterGraphHelper::FormatEventCode(nEventCode));
     1560        STDMETHOD(RestoreDefaultHandling)(LONG nEventCode) override
     1561        {
     1562                _Z4(atlTraceCOM, 4, _T("this 0x%p, nEventCode %s\n"), this, _FilterGraphHelper::FormatEventCode(nEventCode));
    15511563                return m_pInnerMediaEventEx->RestoreDefaultHandling(nEventCode);
    15521564        }
    1553         STDMETHOD(FreeEventParams)(LONG nEventCode, LONG_PTR nParameter1, LONG_PTR nParameter2)
    1554         {
    1555                 _Z4(atlTraceCOM, 4, _T("nEventCode %s, nParameter1 0x%p, nParameter2 0x%p\n"), _FilterGraphHelper::FormatEventCode(nEventCode), nParameter1, nParameter2);
     1565        STDMETHOD(FreeEventParams)(LONG nEventCode, LONG_PTR nParameter1, LONG_PTR nParameter2) override
     1566        {
     1567                _Z4(atlTraceCOM, 4, _T("this 0x%p, nEventCode %s, nParameter1 0x%p, nParameter2 0x%p\n"), this, _FilterGraphHelper::FormatEventCode(nEventCode), nParameter1, nParameter2);
    15561568                return m_pInnerMediaEventEx->FreeEventParams(nEventCode, nParameter1, nParameter2);
    15571569        }
    15581570       
    15591571// IMediaEventEx
    1560         STDMETHOD(SetNotifyWindow)(OAHWND nWindowHandle, LONG nMessage, LONG_PTR nParameter)
    1561         {
    1562                 _Z4(atlTraceCOM, 4, _T("nWindowHandle 0x%08X, nMessage 0x%04x, nParameter %p\n"), nWindowHandle, nMessage, nParameter);
     1572        STDMETHOD(SetNotifyWindow)(OAHWND nWindowHandle, LONG nMessage, LONG_PTR nParameter) override
     1573        {
     1574                _Z4(atlTraceCOM, 4, _T("this 0x%p, nWindowHandle 0x%08X, nMessage 0x%04x, nParameter %p\n"), this, nWindowHandle, nMessage, nParameter);
    15631575                return m_pInnerMediaEventEx->SetNotifyWindow(nWindowHandle, nMessage, nParameter);
    15641576        }
    1565         STDMETHOD(SetNotifyFlags)(LONG nNotifyFlags)
    1566         {
    1567                 _Z4(atlTraceCOM, 4, _T("nNotifyFlags 0x%x\n"), nNotifyFlags);
     1577        STDMETHOD(SetNotifyFlags)(LONG nNotifyFlags) override
     1578        {
     1579                _Z4(atlTraceCOM, 4, _T("this 0x%p, nNotifyFlags 0x%X\n"), this, nNotifyFlags);
    15681580                return m_pInnerMediaEventEx->SetNotifyFlags(nNotifyFlags);
    15691581        }
    1570         STDMETHOD(GetNotifyFlags)(LONG* pnNotifyFlags)
    1571         {
    1572                 _Z4(atlTraceCOM, 4, _T("...\n"));
     1582        STDMETHOD(GetNotifyFlags)(LONG* pnNotifyFlags) override
     1583        {
     1584                _Z4(atlTraceCOM, 4, _T("this 0x%p\n"), this);
    15731585                return m_pInnerMediaEventEx->GetNotifyFlags(pnNotifyFlags);
    15741586        }
    15751587
    15761588// IObjectWithSite
    1577         STDMETHOD(SetSite)(IUnknown* pSite)
    1578         {
    1579                 _Z4(atlTraceCOM, 4, _T("pSite 0x%p\n"), pSite);
     1589        STDMETHOD(SetSite)(IUnknown* pSite) override
     1590        {
     1591                _Z4(atlTraceCOM, 4, _T("this 0x%p, pSite 0x%p\n"), this, pSite);
    15801592                _ATLTRY
    15811593                {
     
    15891601                return S_OK;
    15901602        }
    1591     STDMETHOD(GetSite)(REFIID InterfaceIdentifier, VOID** ppvSite)
    1592         {
    1593                 _Z4(atlTraceCOM, 4, _T("InterfaceIdentifier %ls\n"), _PersistHelper::StringFromInterfaceIdentifier(InterfaceIdentifier));
     1603    STDMETHOD(GetSite)(REFIID InterfaceIdentifier, VOID** ppvSite) override
     1604        {
     1605                _Z4(atlTraceCOM, 4, _T("this 0x%p, InterfaceIdentifier %ls\n"), this, _PersistHelper::StringFromInterfaceIdentifier(InterfaceIdentifier));
    15941606                _ATLTRY
    15951607                {
  • trunk/DirectShowSpy/FilterGraphTable.h

    r545 r831  
    2121////////////////////////////////////////////////////////////
    2222// CFilterGraphTableBase
     23
     24// NOTE: Exclude from legacy Windows XP toolset builds
     25
     26#if NTDDI_VERSION > 0x06010000 // NTDDI_WIN7
     27
     28#define AVAILABILITY_FILTERGRAPHTABLE
    2329
    2430class CFilterGraphTableBase
     
    773779
    774780OBJECT_ENTRY_AUTO(__uuidof(FilterGraphTable), CFilterGraphTable)
     781
     782#endif // NTDDI_VERSION
  • trunk/DirectShowSpy/GraphBuilderCallbackPropertySheet.h

    r432 r831  
    13371337        {
    13381338                if(!_tcslen(m_sPath))
    1339                         m_sPath = CDebugTraceBase::GetLocalMachineFilePath();
     1339                {
     1340                        const CPath sDirectory = CDebugTraceBase::GetLocalMachineDirectory();
     1341                        CDebugTraceData Data;
     1342                        Data.Configure(sDirectory, _T(""), _T(""));
     1343                        Data.CreateLogFilePath(sDirectory);
     1344                        m_sPath = Data.m_pszFilePath;
     1345                }
    13401346                #if _DEVELOPMENT && FALSE
    13411347                        static LPCTSTR g_pszPath = _T("D:\\Projects\\A&H\\LuxRiot\\_Issues\\45 Sanyo XP Issues\\DirectShowSpy.log");
  • trunk/DirectShowSpy/Host01/Host01.vcxproj

    r763 r831  
    11<?xml version="1.0" encoding="utf-8"?>
    2 <Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
     2<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
    33  <ItemGroup Label="ProjectConfigurations">
    44    <ProjectConfiguration Include="Debug|Win32">
     
    2323    <Keyword>Win32Proj</Keyword>
    2424    <RootNamespace>Host01</RootNamespace>
     25    <WindowsTargetPlatformVersion>10.0.16299.0</WindowsTargetPlatformVersion>
    2526  </PropertyGroup>
    2627  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
     
    2829    <ConfigurationType>Application</ConfigurationType>
    2930    <UseDebugLibraries>true</UseDebugLibraries>
    30     <PlatformToolset>v140</PlatformToolset>
     31    <PlatformToolset>v141</PlatformToolset>
    3132    <CharacterSet>Unicode</CharacterSet>
    3233  </PropertyGroup>
     
    3435    <ConfigurationType>Application</ConfigurationType>
    3536    <UseDebugLibraries>true</UseDebugLibraries>
    36     <PlatformToolset>v140</PlatformToolset>
     37    <PlatformToolset>v141</PlatformToolset>
    3738    <CharacterSet>Unicode</CharacterSet>
    3839  </PropertyGroup>
     
    4041    <ConfigurationType>Application</ConfigurationType>
    4142    <UseDebugLibraries>false</UseDebugLibraries>
    42     <PlatformToolset>v140</PlatformToolset>
     43    <PlatformToolset>v141</PlatformToolset>
    4344    <WholeProgramOptimization>true</WholeProgramOptimization>
    4445    <CharacterSet>Unicode</CharacterSet>
     
    4748    <ConfigurationType>Application</ConfigurationType>
    4849    <UseDebugLibraries>false</UseDebugLibraries>
    49     <PlatformToolset>v140</PlatformToolset>
     50    <PlatformToolset>v141</PlatformToolset>
    5051    <WholeProgramOptimization>true</WholeProgramOptimization>
    5152    <CharacterSet>Unicode</CharacterSet>
  • trunk/DirectShowSpy/Module.cpp

    r376 r831  
    8787        return nResult;
    8888}
     89
     90#if defined(AVAILABILITY_INTERNALWRITEMINIDUMP)
     91        #if defined(_WIN64)
     92                #pragma comment(linker, "/EXPORT:WriteMiniDump,PRIVATE")
     93        #else
     94                #pragma comment(linker, "/EXPORT:WriteMiniDump=_WriteMiniDump@16,PRIVATE")
     95                extern "C" // __declspec(dllexport)
     96        #endif
     97        extern "C" STDAPI WriteMiniDump(HWND hParentWindow, HINSTANCE hInstance, LPSTR pszCommandLine, INT nShowCommand)
     98        {
     99                return InternalWriteMiniDump(hParentWindow, hInstance, pszCommandLine, nShowCommand);
     100        }
     101#endif // defined(AVAILABILITY_INTERNALWRITEMINIDUMP)
  • trunk/DirectShowSpy/dllmain.h

    r376 r831  
    3535                TraceModuleVersion();
    3636                _Z4_THIS();
    37                 _W(CExceptionFilter::Initialize());
     37                //_W(CExceptionFilter::Initialize());
    3838        }
    3939        ~CDirectShowSpyModule() throw()
  • trunk/DirectShowSpy/targetver.h

    r763 r831  
    1616#pragma once
    1717
     18#include <winsdkver.h>
    1819#include <sdkddkver.h>
    19 #include <winsdkver.h>
    2020
Note: See TracChangeset for help on using the changeset viewer.