Changeset 351 for trunk/Utilities/EnumerateAudioDevices
- Timestamp:
- Dec 3, 2014, 10:49:10 PM (9 years ago)
- Location:
- trunk/Utilities/EnumerateAudioDevices
- Files:
-
- 3 added
- 2 deleted
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Utilities/EnumerateAudioDevices/EnumerateAudioDevices.cpp
r11 r351 1 1 //////////////////////////////////////////////////////////// 2 // Copyright (C) Roman Ryltsov, 2008-201 12 // Copyright (C) Roman Ryltsov, 2008-2014 3 3 // Created by Roman Ryltsov roman@alax.info 4 //5 // $Id$6 4 7 5 #include "stdafx.h" … … 23 21 CEnumerateAudioDevicesModule() throw() 24 22 { 25 #if _DEVELOPMENT 26 AtlTraceLoadSettings(NULL); 27 #endif // _DEVELOPMENT 23 AtlTraceSetDefaultSettings(); 28 24 _W(CExceptionFilter::Initialize()); 29 _Z4 (atlTraceRefcount, 4, _T("this 0x%p\n"), this);25 _Z4_THIS(); 30 26 } 31 27 ~CEnumerateAudioDevicesModule() throw() 32 28 { 33 _Z4 (atlTraceRefcount, 4, _T("this 0x%p\n"), this);29 _Z4_THIS(); 34 30 CExceptionFilter::Terminate(); 35 31 } -
trunk/Utilities/EnumerateAudioDevices/EnumerateAudioDevices.rc
r11 r351 116 116 117 117 VS_VERSION_INFO VERSIONINFO 118 FILEVERSION 1, 0, 0, 37118 FILEVERSION 1, 0, 0, 50 119 119 PRODUCTVERSION 1,0,0,1 120 120 FILEFLAGSMASK 0x3fL … … 135 135 VALUE "Created By", "Roman Ryltsov <roman@alax.info>" 136 136 VALUE "FileDescription", "Enumerate WASAPI Audio Devices Utility" 137 VALUE "FileVersion", "1, 0, 0, 37\0"137 VALUE "FileVersion", "1, 0, 0, 50\0" 138 138 VALUE "InternalName", "EnumerateAudioDevices" 139 139 VALUE "LegalCopyright", "Copyright © Alax.Info, Roman Ryltsov, 2008-2011" -
trunk/Utilities/EnumerateAudioDevices/EnumerateAudioDevices.sln
r11 r351 1 1 2 2 Microsoft Visual Studio Solution File, Format Version 11.00 3 # Visual Studio 201 03 # Visual Studio 2012 4 4 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "EnumerateAudioDevices", "EnumerateAudioDevices.vcxproj", "{1AB74749-013C-4258-8B40-CB8B2E44F2B7}" 5 5 EndProject -
trunk/Utilities/EnumerateAudioDevices/EnumerateAudioDevices.vcxproj
r11 r351 29 29 <CharacterSet>Unicode</CharacterSet> 30 30 <WholeProgramOptimization>true</WholeProgramOptimization> 31 <PlatformToolset>v110_xp</PlatformToolset> 31 32 </PropertyGroup> 32 33 <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> 33 34 <ConfigurationType>Application</ConfigurationType> 34 35 <CharacterSet>Unicode</CharacterSet> 36 <PlatformToolset>v110_xp</PlatformToolset> 35 37 </PropertyGroup> 36 38 <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> … … 39 41 <CharacterSet>Unicode</CharacterSet> 40 42 <WholeProgramOptimization>true</WholeProgramOptimization> 43 <PlatformToolset>v110_xp</PlatformToolset> 41 44 </PropertyGroup> 42 45 <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> 43 46 <ConfigurationType>Application</ConfigurationType> 44 47 <CharacterSet>Unicode</CharacterSet> 48 <PlatformToolset>v110_xp</PlatformToolset> 45 49 </PropertyGroup> 46 50 <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> -
trunk/Utilities/EnumerateAudioDevices/MainDialog.h
r11 r351 2 2 // Copyright (C) Roman Ryltsov, 2008-2011 3 3 // Created by Roman Ryltsov roman@alax.info 4 //5 // $Id$6 4 7 5 #pragma once … … 68 66 for(UINT nDeviceIndex = 0; nDeviceIndex < nDeviceCount; nDeviceIndex++) 69 67 _ATLTRY 70 {68 { 71 69 sText.AppendFormat(_T("Device %d:\r\n"), nDeviceIndex); 72 70 CComPtr<IMMDevice> pMmDevice; … … 1157 1155 if(sKeyName.IsEmpty()) 1158 1156 sKeyName = AtlFormatString(_T("%ls, %d"), _PersistHelper::StringFromIdentifier(Key.fmtid), Key.pid); 1157 #pragma region String Value 1159 1158 CString sValue; 1160 1159 HRESULT nChangeTypeResult = E_FAIL; … … 1176 1175 sValue += _T(", "); 1177 1176 CRoArrayT<CString> Array; 1178 if(Value.blob.cbSize <= 16) 1177 static const SIZE_T g_nMaximalSize = 128; 1178 if(Value.blob.cbSize <= g_nMaximalSize) 1179 1179 { 1180 1180 for(ULONG nIndex = 0; nIndex < Value.blob.cbSize; nIndex++) … … 1182 1182 } else 1183 1183 { 1184 for(ULONG nIndex = 0; nIndex < 8; nIndex++)1184 for(ULONG nIndex = 0; nIndex < g_nMaximalSize - 8; nIndex++) 1185 1185 _W(Array.Add(AtlFormatString(_T("%02X"), Value.blob.pBlobData[nIndex])) >= 0); 1186 1186 _W(Array.Add(_T("...")) >= 0); … … 1197 1197 break; 1198 1198 } 1199 #pragma region Variant as String 1199 1200 CComVariant vValue; 1200 1201 if(FAILED(nChangeTypeResult)) … … 1206 1207 sValue = _T("???"); 1207 1208 } 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")); 1209 1267 } 1210 1268 _ATLCATCHALL() -
trunk/Utilities/EnumerateAudioDevices/stdafx.h
r11 r351 10 10 // Windows definitions 11 11 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 18 14 #define INLINE_HRESULT_FROM_WIN32 19 15 … … 51 47 #define _WTL_NEW_PAGE_NOTIFY_HANDLERS 52 48 49 #undef _SYSINFOAPI_H_ 53 50 #include <atlapp.h> 51 #define _SYSINFOAPI_H_ 52 54 53 #include <atlgdi.h> 55 54 #include <atluser.h> … … 68 67 #define SRWLOCK_THROUGH_CRITICALSECTION // Legacy Compatibility 69 68 70 #define REGISTRY_PRODUCTROOT _T("SOFTWARE\\Alax.Info\\Utilit ies\\Log Process Exceptions")69 #define REGISTRY_PRODUCTROOT _T("SOFTWARE\\Alax.Info\\Utility\\EnumerateAudioDevices") 71 70 #define REGISTRY_FILEROOT REGISTRY_PRODUCTROOT 72 71 #define REGISTRY_ROOT REGISTRY_FILEROOT
Note: See TracChangeset
for help on using the changeset viewer.