Changeset 166


Ignore:
Timestamp:
Jan 21, 2013, 11:31:52 AM (9 years ago)
Author:
roman
Message:
 
Location:
trunk/Utilities/StressEvr
Files:
1 deleted
14 edited

Legend:

Unmodified
Added
Removed
  • trunk/Utilities/StressEvr/AboutDialog.h

    r56 r166  
    11////////////////////////////////////////////////////////////
    2 // Copyright (C) Roman Ryltsov, 2008-2011
     2// Copyright (C) Roman Ryltsov, 2009-2012
    33// Created by Roman Ryltsov roman@alax.info
    44//
     
    7171        {
    7272                CStatic(GetDlgItem(IDC_ABOUT_ICON)).SetIcon(AtlLoadIconImage(IDI_MODULE, LR_DEFAULTCOLOR, 48, 48));
    73                 #pragma region Create and apply title font
     73                #pragma region Title Font
    7474                m_TitleFont = CreateTitleFont();
    7575                CStatic(GetDlgItem(IDC_ABOUT_TITLE)).SetFont(m_TitleFont);
    7676                #pragma endregion
    77                 #pragma region Create and apply disclaimer font
     77                #pragma region Disclaimer Font
    7878                {
    7979                        m_DisclaimerFont = CreateDisclaimerFont();
     
    100100                }
    101101                #pragma endregion
    102                 #pragma region Update version text
     102                #pragma region Version Text
    103103                CStatic ProductVersionStatic = GetDlgItem(IDC_ABOUT_PRODUCTVERSION), FileVersionStatic = GetDlgItem(IDC_ABOUT_FILEVERSION);
    104104                CString sProductVersionFormat, sFileVersionFormat;
     
    109109                FileVersionStatic.SetWindowText(_VersionInfoHelper::GetVersionString(_VersionInfoHelper::GetFileVersion(sModulePath), sFileVersionFormat));
    110110                #pragma endregion
    111                 #pragma region Update hyperlinks
     111                #pragma region Hyperlinks
    112112                _W(m_WebsiteHyperStatic.SubclassWindow(GetDlgItem(IDC_ABOUT_WEBSITE)));
    113113                _W(m_EmailHyperStatic.SubclassWindow(GetDlgItem(IDC_ABOUT_EMAIL)));
    114114                #pragma endregion
    115                 #pragma region Update caption
     115                #pragma region Caption
    116116                {
    117 #if _TRACE
     117                        #if _TRACE || defined(_WIN64)
    118118                        CString sCaption;
    119119                        _W(GetWindowText(sCaption));
    120120                        sCaption.Append(_T(" // "));
    121 #if _DEVELOPMENT
     121                        #if _DEVELOPMENT
    122122                        sCaption.Append(_T("Dev "));
    123 #endif // _DEVELOPMENT
     123                        #endif // _DEVELOPMENT
    124124                        sCaption.Append(_VersionInfoHelper::GetVersionString(_VersionInfoHelper::GetFileVersion(_VersionInfoHelper::GetModulePath())));
     125                        #if defined(_WIN64)
     126                        sCaption.Append(_T(" (x64)"));
     127                        #endif // defined(_WIN64)
    125128                        _W(SetWindowText(sCaption));
    126 #endif // _TRACE
     129                        #endif // _TRACE || defined(_WIN64)
    127130                }
    128131                #pragma endregion
    129                 #pragma region Update window position and focus
     132                #pragma region Window Position and Focus
    130133                _W(CenterWindow(GetParent()));
    131134                GetDlgItem(IDOK).SetFocus();
  • trunk/Utilities/StressEvr/MainDialog.h

    r56 r166  
    11////////////////////////////////////////////////////////////
    2 // Copyright (C) Roman Ryltsov, 2008-2012
     2// Copyright (C) Roman Ryltsov, 2008-2013
    33// Created by Roman Ryltsov roman@alax.info
    4 //
    5 // $Id$
    64
    75#pragma once
     
    4341        {
    4442                return CLSID_EnhancedVideoRenderer;
     43        }
     44        static CComPtr<IBaseFilter> CoCreateBaseFilterInstance()
     45        {
     46                CComPtr<IBaseFilter> pBaseFilter;
     47                HRESULT nCoCreateInstanceResult = pBaseFilter.CoCreateInstance(GetRendererClassIdentifier());
     48                _Z45_HRESULT(nCoCreateInstanceResult);
     49                if(nCoCreateInstanceResult == REGDB_E_CLASSNOTREG)
     50                {
     51                        #pragma region Windows XP Second Chance Instantiation
     52                        HINSTANCE hInstance = CoLoadLibrary(CT2OLE(_T("evr.dll")), TRUE);
     53                        if(hInstance)
     54                        {
     55                                _ATLTRY
     56                                {
     57                                        typedef HRESULT (STDMETHODCALLTYPE *DLLGETCLASSOBJECT)(REFCLSID ClassIdentifier, REFIID InterfaceIdentifier, LPVOID* ppvObject);
     58                                        DLLGETCLASSOBJECT pDllGetClassObject = (DLLGETCLASSOBJECT) GetProcAddress(hInstance, "DllGetClassObject");
     59                                        __E(pDllGetClassObject);
     60                                        CComPtr<IClassFactory> pClassFactory;
     61                                        __C((pDllGetClassObject)(GetRendererClassIdentifier(), __uuidof(IClassFactory), (VOID**) &pClassFactory));
     62                                        _A(pClassFactory);
     63                                        const HRESULT nCreateInstanceResult = pClassFactory->CreateInstance(NULL, __uuidof(IBaseFilter), (VOID**) &pBaseFilter);
     64                                        _Z45_HRESULT(nCreateInstanceResult);
     65                                        if(SUCCEEDED(nCreateInstanceResult))
     66                                                nCoCreateInstanceResult = nCreateInstanceResult;
     67                                }
     68                                _ATLCATCHALL()
     69                                {
     70                                        _Z_EXCEPTION();
     71                                }
     72                                //CoFreeLibrary(hInstance);
     73                        }
     74                        #pragma endregion
     75                }
     76                __C(nCoCreateInstanceResult);
     77                return pBaseFilter;
    4578        }
    4679        VOID Initialize(IBaseFilter* pBaseFilter)
     
    450483                {
    451484                        CEvrWindow& EvrWindow = m_EvrWindowArray[m_EvrWindowArray.Add()];
    452                         CComPtr<IBaseFilter> pBaseFilter;
    453                         __C(pBaseFilter.CoCreateInstance(CEvrWindow::GetRendererClassIdentifier()));
     485                        CComPtr<IBaseFilter> pBaseFilter = CEvrWindow::CoCreateBaseFilterInstance();
    454486                        __C(m_FilterGraph->AddFilter(pBaseFilter, CT2CW(AtlFormatString(_T("Renderer %02d"), nIndex + 1))));
    455487                        EvrWindow.Create(m_hWnd);
     
    621653                #pragma region DXGI
    622654                m_DxgiEdit = GetDlgItem(IDC_DXGI);
    623                 _ATLTRY
    624                 {
    625                         __C(CreateDXGIFactory(__uuidof(IDXGIFactory), (VOID**) &m_pDxgiFactory));
    626                         SetTimer(TIMER_UPDATEADAPTERS, 5 * 1000); // 5 seconds
    627                         _W(PostMessage(WM_TIMER, TIMER_UPDATEADAPTERS));
    628                 }
    629                 _ATLCATCH(Exception)
    630                 {
    631                         _Z_ATLEXCEPTION(Exception);
    632                         m_DxgiEdit.SetValue(AtlFormatString(_T("Failed to initialize with DXGI: %s."), AtlFormatSystemMessage(Exception).TrimRight(_T("\t\n\r ."))));
    633                 }
     655                if(GetOsVersion() >= 0x00060000) // Windows Vista+
     656                {
     657                        _ATLTRY
     658                        {
     659                                __C(CreateDXGIFactory(__uuidof(IDXGIFactory), (VOID**) &m_pDxgiFactory));
     660                                SetTimer(TIMER_UPDATEADAPTERS, 5 * 1000); // 5 seconds
     661                                _W(PostMessage(WM_TIMER, TIMER_UPDATEADAPTERS));
     662                        }
     663                        _ATLCATCH(Exception)
     664                        {
     665                                _Z_ATLEXCEPTION(Exception);
     666                                m_DxgiEdit.SetValue(AtlFormatString(_T("Failed to initialize with DXGI: %s."), AtlFormatSystemMessage(Exception).TrimRight(_T("\t\n\r ."))));
     667                        }
     668                } else
     669                        m_DxgiEdit.SetValue(_T("DXGI is not available."));
    634670                #pragma endregion
    635671                _W(GetWindowRect(m_DefaultPosition));
  • trunk/Utilities/StressEvr/StressEvr.cpp

    r56 r166  
    11////////////////////////////////////////////////////////////
    2 // Copyright (C) Roman Ryltsov, 2008-2012
     2// Copyright (C) Roman Ryltsov, 2008-2013
    33// Created by Roman Ryltsov roman@alax.info
    4 //
    5 // $Id$
    64
    75#include "stdafx.h"
     
    2725        CStressEvrModule() throw()
    2826        {
    29                 #if defined(_DEBUG)
    30                 AtlTraceLoadSettings(NULL);
    31                 #endif // defined(_DEBUG)
     27                AtlTraceSetDefaultSettings();
    3228                _W(CExceptionFilter::Initialize());
    3329                _Z4(atlTraceRefcount, 4, _T("this 0x%p\n"), this);
  • trunk/Utilities/StressEvr/StressEvr.idl

    r56 r166  
    11////////////////////////////////////////////////////////////
    2 // Copyright (C) Roman Ryltsov, 2008-2012
     2// Copyright (C) Roman Ryltsov, 2008-2013
    33// Created by Roman Ryltsov roman@alax.info
    4 //
    5 // $Id$
    64
    75import "oaidl.idl";
  • trunk/Utilities/StressEvr/StressEvr.vcxproj

    r56 r166  
    199199      <GenerateDebugInformation>true</GenerateDebugInformation>
    200200      <LargeAddressAware>true</LargeAddressAware>
     201      <DelayLoadDLLs>dbghelp.dll;dxgi.dll</DelayLoadDLLs>
    201202    </Link>
    202203    <PostBuildEvent>
     
    232233      <GenerateDebugInformation>true</GenerateDebugInformation>
    233234      <LargeAddressAware>true</LargeAddressAware>
     235      <DelayLoadDLLs>dbghelp.dll;dxgi.dll</DelayLoadDLLs>
    234236    </Link>
    235237    <PostBuildEvent>
     
    277279      <EnableCOMDATFolding>true</EnableCOMDATFolding>
    278280      <OptimizeReferences>true</OptimizeReferences>
    279       <DelayLoadDLLs>dbghelp.dll</DelayLoadDLLs>
     281      <DelayLoadDLLs>dbghelp.dll;dxgi.dll</DelayLoadDLLs>
    280282      <LargeAddressAware>true</LargeAddressAware>
    281283    </Link>
     
    322324      <EnableCOMDATFolding>true</EnableCOMDATFolding>
    323325      <OptimizeReferences>true</OptimizeReferences>
    324       <DelayLoadDLLs>dbghelp.dll</DelayLoadDLLs>
     326      <DelayLoadDLLs>dbghelp.dll;dxgi.dll</DelayLoadDLLs>
    325327      <LargeAddressAware>true</LargeAddressAware>
    326328    </Link>
     
    369371      <EnableCOMDATFolding>true</EnableCOMDATFolding>
    370372      <OptimizeReferences>true</OptimizeReferences>
    371       <DelayLoadDLLs>dbghelp.dll</DelayLoadDLLs>
     373      <DelayLoadDLLs>dbghelp.dll;dxgi.dll</DelayLoadDLLs>
    372374      <LargeAddressAware>true</LargeAddressAware>
    373375    </Link>
     
    414416      <EnableCOMDATFolding>true</EnableCOMDATFolding>
    415417      <OptimizeReferences>true</OptimizeReferences>
    416       <DelayLoadDLLs>dbghelp.dll</DelayLoadDLLs>
     418      <DelayLoadDLLs>dbghelp.dll;dxgi.dll</DelayLoadDLLs>
    417419      <LargeAddressAware>true</LargeAddressAware>
    418420    </Link>
     
    461463      <EnableCOMDATFolding>true</EnableCOMDATFolding>
    462464      <OptimizeReferences>true</OptimizeReferences>
    463       <DelayLoadDLLs>dbghelp.dll</DelayLoadDLLs>
     465      <DelayLoadDLLs>dbghelp.dll;dxgi.dll</DelayLoadDLLs>
    464466      <LargeAddressAware>true</LargeAddressAware>
    465467    </Link>
     
    506508      <EnableCOMDATFolding>true</EnableCOMDATFolding>
    507509      <OptimizeReferences>true</OptimizeReferences>
    508       <DelayLoadDLLs>dbghelp.dll</DelayLoadDLLs>
     510      <DelayLoadDLLs>dbghelp.dll;dxgi.dll</DelayLoadDLLs>
    509511      <LargeAddressAware>true</LargeAddressAware>
    510512    </Link>
     
    566568    <None Include="Information.ico" />
    567569    <None Include="Module.ico" />
    568     <None Include="ReadMe.txt" />
    569570    <None Include="StressEvr.rgs" />
    570571  </ItemGroup>
  • trunk/Utilities/StressEvr/StressEvr.vcxproj.filters

    r56 r166  
    5353  </ItemGroup>
    5454  <ItemGroup>
    55     <None Include="ReadMe.txt" />
    5655    <None Include="StressEvr.rgs">
    5756      <Filter>Resource Files</Filter>
  • trunk/Utilities/StressEvr/StressEvr_i.c

    r56 r166  
    77
    88 /* File created by MIDL compiler version 7.00.0555 */
    9 /* at Sat Mar 03 16:39:52 2012
     9/* at Mon Jan 21 21:25:14 2013
    1010 */
    1111/* Compiler settings for StressEvr.idl:
  • trunk/Utilities/StressEvr/StressEvr_i.h

    r56 r166  
    55
    66 /* File created by MIDL compiler version 7.00.0555 */
    7 /* at Sat Mar 03 16:39:52 2012
     7/* at Mon Jan 21 21:25:14 2013
    88 */
    99/* Compiler settings for StressEvr.idl:
  • trunk/Utilities/StressEvr/stdafx.cpp

    r56 r166  
    11////////////////////////////////////////////////////////////
    2 // Copyright (C) Roman Ryltsov, 2008-2012
     2// Copyright (C) Roman Ryltsov, 2008-2013
    33// Created by Roman Ryltsov roman@alax.info
    4 //
    5 // $Id$
    64
    75#include "stdafx.h"
  • trunk/Utilities/StressEvr/stdafx.h

    r56 r166  
    11////////////////////////////////////////////////////////////
     2// Copyright (C) Roman Ryltsov, 2008-2013
    23// Created by Roman Ryltsov roman@alax.info
    3 // $Id$
    44
    55#pragma once
     
    6767// Alax.Info ATL/WTL
    6868
    69 #define REGISTRY_PRODUCTROOT    _T("SOFTWARE\\Alax.Info\\Utilities\\RTSP RTMP Streamer")
     69#define REGISTRY_PRODUCTROOT    _T("SOFTWARE\\Alax.Info\\Utility\\StressEvr")
    7070#define REGISTRY_FILEROOT               REGISTRY_PRODUCTROOT
    7171#define REGISTRY_ROOT                   REGISTRY_FILEROOT
  • trunk/Utilities/StressEvr/targetver.h

    r56 r166  
    11////////////////////////////////////////////////////////////
    2 // Copyright (C) Roman Ryltsov, 2008-2012
     2// Copyright (C) Roman Ryltsov, 2008-2013
    33// Created by Roman Ryltsov roman@alax.info
    4 //
    5 // $Id$
    64
    75#pragma once
Note: See TracChangeset for help on using the changeset viewer.