Ignore:
Timestamp:
Dec 3, 2014, 10:49:10 PM (9 years ago)
Author:
roman
Message:
 
Location:
trunk/Utilities/EnumerateAudioDevices
Files:
3 added
2 deleted
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/Utilities/EnumerateAudioDevices/EnumerateAudioDevices.cpp

    r11 r351  
    11////////////////////////////////////////////////////////////
    2 // Copyright (C) Roman Ryltsov, 2008-2011
     2// Copyright (C) Roman Ryltsov, 2008-2014
    33// Created by Roman Ryltsov roman@alax.info
    4 //
    5 // $Id$
    64
    75#include "stdafx.h"
     
    2321        CEnumerateAudioDevicesModule() throw()
    2422        {
    25 #if _DEVELOPMENT
    26                 AtlTraceLoadSettings(NULL);
    27 #endif // _DEVELOPMENT
     23                AtlTraceSetDefaultSettings();
    2824                _W(CExceptionFilter::Initialize());
    29                 _Z4(atlTraceRefcount, 4, _T("this 0x%p\n"), this);
     25                _Z4_THIS();
    3026        }
    3127        ~CEnumerateAudioDevicesModule() throw()
    3228        {
    33                 _Z4(atlTraceRefcount, 4, _T("this 0x%p\n"), this);
     29                _Z4_THIS();
    3430                CExceptionFilter::Terminate();
    3531        }
  • trunk/Utilities/EnumerateAudioDevices/EnumerateAudioDevices.rc

    r11 r351  
    116116
    117117VS_VERSION_INFO VERSIONINFO
    118  FILEVERSION  1, 0, 0, 37
     118 FILEVERSION  1, 0, 0, 50
    119119 PRODUCTVERSION 1,0,0,1
    120120 FILEFLAGSMASK 0x3fL
     
    135135            VALUE "Created By", "Roman Ryltsov <roman@alax.info>"
    136136            VALUE "FileDescription", "Enumerate WASAPI Audio Devices Utility"
    137             VALUE "FileVersion",  "1, 0, 0, 37\0"
     137            VALUE "FileVersion",  "1, 0, 0, 50\0"
    138138            VALUE "InternalName", "EnumerateAudioDevices"
    139139            VALUE "LegalCopyright", "Copyright © Alax.Info, Roman Ryltsov, 2008-2011"
  • trunk/Utilities/EnumerateAudioDevices/EnumerateAudioDevices.sln

    r11 r351  
    11
    22Microsoft Visual Studio Solution File, Format Version 11.00
    3 # Visual Studio 2010
     3# Visual Studio 2012
    44Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "EnumerateAudioDevices", "EnumerateAudioDevices.vcxproj", "{1AB74749-013C-4258-8B40-CB8B2E44F2B7}"
    55EndProject
  • trunk/Utilities/EnumerateAudioDevices/EnumerateAudioDevices.vcxproj

    r11 r351  
    2929    <CharacterSet>Unicode</CharacterSet>
    3030    <WholeProgramOptimization>true</WholeProgramOptimization>
     31    <PlatformToolset>v110_xp</PlatformToolset>
    3132  </PropertyGroup>
    3233  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
    3334    <ConfigurationType>Application</ConfigurationType>
    3435    <CharacterSet>Unicode</CharacterSet>
     36    <PlatformToolset>v110_xp</PlatformToolset>
    3537  </PropertyGroup>
    3638  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
     
    3941    <CharacterSet>Unicode</CharacterSet>
    4042    <WholeProgramOptimization>true</WholeProgramOptimization>
     43    <PlatformToolset>v110_xp</PlatformToolset>
    4144  </PropertyGroup>
    4245  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
    4346    <ConfigurationType>Application</ConfigurationType>
    4447    <CharacterSet>Unicode</CharacterSet>
     48    <PlatformToolset>v110_xp</PlatformToolset>
    4549  </PropertyGroup>
    4650  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
  • trunk/Utilities/EnumerateAudioDevices/MainDialog.h

    r11 r351  
    22// Copyright (C) Roman Ryltsov, 2008-2011
    33// Created by Roman Ryltsov roman@alax.info
    4 //
    5 // $Id$
    64
    75#pragma once
     
    6866                                for(UINT nDeviceIndex = 0; nDeviceIndex < nDeviceCount; nDeviceIndex++)
    6967                                        _ATLTRY
    70                                         {
     68                                        {
    7169                                                sText.AppendFormat(_T("Device %d:\r\n"), nDeviceIndex);
    7270                                                CComPtr<IMMDevice> pMmDevice;
     
    11571155                                                                        if(sKeyName.IsEmpty())
    11581156                                                                                sKeyName = AtlFormatString(_T("%ls, %d"), _PersistHelper::StringFromIdentifier(Key.fmtid), Key.pid);
     1157                                                                        #pragma region String Value
    11591158                                                                        CString sValue;
    11601159                                                                        HRESULT nChangeTypeResult = E_FAIL;
     
    11761175                                                                                        sValue += _T(", ");
    11771176                                                                                        CRoArrayT<CString> Array;
    1178                                                                                         if(Value.blob.cbSize <= 16)
     1177                                                                                        static const SIZE_T g_nMaximalSize = 128;
     1178                                                                                        if(Value.blob.cbSize <= g_nMaximalSize)
    11791179                                                                                        {
    11801180                                                                                                for(ULONG nIndex = 0; nIndex < Value.blob.cbSize; nIndex++)
     
    11821182                                                                                        } else
    11831183                                                                                        {
    1184                                                                                                 for(ULONG nIndex = 0; nIndex < 8; nIndex++)
     1184                                                                                                for(ULONG nIndex = 0; nIndex < g_nMaximalSize - 8; nIndex++)
    11851185                                                                                                        _W(Array.Add(AtlFormatString(_T("%02X"), Value.blob.pBlobData[nIndex])) >= 0);
    11861186                                                                                                _W(Array.Add(_T("...")) >= 0);
     
    11971197                                                                                break;
    11981198                                                                        }
     1199                                                                        #pragma region Variant as String
    11991200                                                                        CComVariant vValue;
    12001201                                                                        if(FAILED(nChangeTypeResult))
     
    12061207                                                                                        sValue = _T("???");
    12071208                                                                        }
    1208                                                                         sText.AppendFormat(_T("\t\t") _T("%s\t%s\t%d\r\n"), sKeyName, sValue, Value.vt);
     1209                                                                        #pragma endregion
     1210                                                                        #pragma endregion
     1211                                                                        static const CEnumerationNameT<VARTYPE> g_pVarTypeMap[] =
     1212                                                                        {
     1213                                                                                #define A(x) { x, #x },
     1214                                                                                A(VT_EMPTY)
     1215                                                                                A(VT_NULL)
     1216                                                                                A(VT_I2)
     1217                                                                                A(VT_I4)
     1218                                                                                A(VT_R4)
     1219                                                                                A(VT_R8)
     1220                                                                                A(VT_CY)
     1221                                                                                A(VT_DATE)
     1222                                                                                A(VT_BSTR)
     1223                                                                                A(VT_DISPATCH)
     1224                                                                                A(VT_ERROR)
     1225                                                                                A(VT_BOOL)
     1226                                                                                A(VT_VARIANT)
     1227                                                                                A(VT_UNKNOWN)
     1228                                                                                A(VT_DECIMAL)
     1229                                                                                A(VT_I1)
     1230                                                                                A(VT_UI1)
     1231                                                                                A(VT_UI2)
     1232                                                                                A(VT_UI4)
     1233                                                                                A(VT_I8)
     1234                                                                                A(VT_UI8)
     1235                                                                                A(VT_INT)
     1236                                                                                A(VT_UINT)
     1237                                                                                A(VT_VOID)
     1238                                                                                A(VT_HRESULT)
     1239                                                                                A(VT_PTR)
     1240                                                                                A(VT_SAFEARRAY)
     1241                                                                                A(VT_CARRAY)
     1242                                                                                A(VT_USERDEFINED)
     1243                                                                                A(VT_LPSTR)
     1244                                                                                A(VT_LPWSTR)
     1245                                                                                A(VT_RECORD)
     1246                                                                                A(VT_INT_PTR)
     1247                                                                                A(VT_UINT_PTR)
     1248                                                                                A(VT_FILETIME)
     1249                                                                                A(VT_BLOB)
     1250                                                                                A(VT_STREAM)
     1251                                                                                A(VT_STORAGE)
     1252                                                                                A(VT_STREAMED_OBJECT)
     1253                                                                                A(VT_STORED_OBJECT)
     1254                                                                                A(VT_BLOB_OBJECT)
     1255                                                                                A(VT_CF)
     1256                                                                                A(VT_CLSID)
     1257                                                                                A(VT_VERSIONED_STREAM)
     1258                                                                                #undef A
     1259                                                                        };
     1260                                                                        sText.Append(_StringHelper::Join<CString>(5, _T("\t"),
     1261                                                                                _T(""),
     1262                                                                                _T(""),
     1263                                                                                sKeyName,
     1264                                                                                sValue,
     1265                                                                                FormatEnumerationT(g_pVarTypeMap, Value.vt),
     1266                                                                                0) + _T("\r\n"));
    12091267                                                                }
    12101268                                                                _ATLCATCHALL()
  • trunk/Utilities/EnumerateAudioDevices/stdafx.h

    r11 r351  
    1010// Windows definitions
    1111
    12 //#define STRICT
    13 #define WINVER                                          0x0501  // Windows XP
    14 #define _WIN32_WINNT                            0x0501  // Windows XP
    15 #define _WIN32_WINDOWS                          0x0410  // Windows 98
    16 #define _WIN32_IE                                       0x0501  // Internet Explorer 5.01
    17 #define _RICHEDIT_VER                           0x0200  // RichEdit 2.0
     12#include <SDKDDKVer.h>
     13
    1814#define INLINE_HRESULT_FROM_WIN32
    1915
     
    5147#define _WTL_NEW_PAGE_NOTIFY_HANDLERS
    5248
     49#undef _SYSINFOAPI_H_
    5350#include <atlapp.h>
     51#define _SYSINFOAPI_H_
     52
    5453#include <atlgdi.h>
    5554#include <atluser.h>
     
    6867#define SRWLOCK_THROUGH_CRITICALSECTION // Legacy Compatibility
    6968
    70 #define REGISTRY_PRODUCTROOT    _T("SOFTWARE\\Alax.Info\\Utilities\\Log Process Exceptions")
     69#define REGISTRY_PRODUCTROOT    _T("SOFTWARE\\Alax.Info\\Utility\\EnumerateAudioDevices")
    7170#define REGISTRY_FILEROOT               REGISTRY_PRODUCTROOT
    7271#define REGISTRY_ROOT                   REGISTRY_FILEROOT
Note: See TracChangeset for help on using the changeset viewer.