- Timestamp:
- Jul 7, 2013, 2:37:32 AM (11 years ago)
- Location:
- trunk/DirectShowSpy
- Files:
-
- 4 added
- 4 deleted
- 20 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/DirectShowSpy/AboutDialog.h
r95 r196 2 2 // Copyright (C) Roman Ryltsov, 2008-2011 3 3 // Created by Roman Ryltsov roman@alax.info 4 //5 // $Id: AboutDialog.h 302 2011-07-26 08:46:45Z alax $6 4 7 5 #pragma once -
trunk/DirectShowSpy/Common.h
r95 r196 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 … … 136 134 _Z4(atlTraceRegistrar, 4, _T("nOsVersion 0x%08x\n"), nOsVersion); 137 135 CProcessTokenPrivileges ProcessTokenPrivileges; 138 if(nOsVersion >= 0x060000) // Vista+136 if(nOsVersion >= 0x060000) // Win Vista+ 139 137 _ATLTRY 140 138 { … … 153 151 if(!bRegister && nCoGetTreatAsClassResult == S_OK) 154 152 { 155 if(nOsVersion >= 0x060000) // Vista+153 if(nOsVersion >= 0x060000) // Win Vista+ 156 154 ClassIdentifierRegKeySecurity.Adjust(); 157 155 __C(CoTreatAsClass(TreatAsClassIdentifier, CLSID_NULL)); … … 161 159 if(bRegister) 162 160 { 163 if(nOsVersion >= 0x060000) // Vista+161 if(nOsVersion >= 0x060000) // Win Vista+ 164 162 ClassIdentifierRegKeySecurity.Adjust(); 165 #if _DEVELOPMENT166 const HRESULT nCoTreatAsClassResult = CoTreatAsClass(TreatAsClassIdentifier, T::GetObjectCLSID());167 _Z2(atlTraceRegistrar, SUCCEEDED(nCoTreatAsClassResult) ? 4 : 2, _T("nCoTreatAsClassResult 0x%08x\n"), nCoTreatAsClassResult);168 __C(nCoTreatAsClassResult);169 const HRESULT nCoGetTreatAsClassResult = CoGetTreatAsClass(TreatAsClassIdentifier, &CurrentTreatAsClassIdentifier);170 _Z4(atlTraceRegistrar, 4, _T("nCoGetTreatAsClassResult 0x%08x, CurrentTreatAsClassIdentifier %ls\n"), nCoGetTreatAsClassResult, _PersistHelper::StringFromIdentifier(CurrentTreatAsClassIdentifier));171 _A(CurrentTreatAsClassIdentifier == T::GetObjectCLSID());172 #else173 __C(CoTreatAsClass(TreatAsClassIdentifier, T::GetObjectCLSID()));174 #endif // _DEVELOPMENT163 #if _DEVELOPMENT 164 const HRESULT nCoTreatAsClassResult = CoTreatAsClass(TreatAsClassIdentifier, T::GetObjectCLSID()); 165 _Z2(atlTraceRegistrar, SUCCEEDED(nCoTreatAsClassResult) ? 4 : 2, _T("nCoTreatAsClassResult 0x%08x\n"), nCoTreatAsClassResult); 166 __C(nCoTreatAsClassResult); 167 const HRESULT nCoGetTreatAsClassResult = CoGetTreatAsClass(TreatAsClassIdentifier, &CurrentTreatAsClassIdentifier); 168 _Z4(atlTraceRegistrar, 4, _T("nCoGetTreatAsClassResult 0x%08x, CurrentTreatAsClassIdentifier %ls\n"), nCoGetTreatAsClassResult, _PersistHelper::StringFromIdentifier(CurrentTreatAsClassIdentifier)); 169 _A(CurrentTreatAsClassIdentifier == T::GetObjectCLSID()); 170 #else 171 __C(CoTreatAsClass(TreatAsClassIdentifier, T::GetObjectCLSID())); 172 #endif // _DEVELOPMENT 175 173 } 176 174 } -
trunk/DirectShowSpy/Configuration.cpp
r193 r196 4 4 5 5 #include "stdafx.h" 6 #include <dshow.h> 6 7 #include "resource.h" 8 #include "Common.h" 7 9 #include "Configuration.h" 8 10 9 11 //////////////////////////////////////////////////////////// 10 // CRegistrationPropertySheet 12 // UnregisterTreatAsClasses 13 14 #if defined(_WIN64) 15 extern "C" __declspec(dllexport) 16 #else 17 #pragma comment(linker, "/EXPORT:UnregisterTreatAsClasses=_UnregisterTreatAsClasses@0,PRIVATE") 18 extern "C" // __declspec(dllexport) 19 #endif // defined(_WIN64) 20 21 HRESULT STDMETHODCALLTYPE UnregisterTreatAsClasses() throw() 22 { 23 _ATLTRY 24 { 25 static const CLSID* g_ppClassIdentifiers[] = 26 { 27 &CLSID_FilterMapper2, // CFilterMapperSpy 28 &CLSID_SystemDeviceEnum, // CLSID_SystemDeviceEnumeratorSpy 29 &CLSID_FilterGraph, // CLSID_Spy 30 &CLSID_FilterGraphNoThread, // CLSID_NoThreadSpy 31 }; 32 const ULONG nOsVersion = GetOsVersion(); 33 _Z4(atlTraceGeneral, 4, _T("nOsVersion 0x%08x\n"), nOsVersion); 34 CProcessTokenPrivileges ProcessTokenPrivileges; 35 BOOL bProcessTokenPrivilegesAdjustNeeded = TRUE; 36 for(SIZE_T nIndex = 0; nIndex < DIM(g_ppClassIdentifiers); nIndex++) 37 { 38 const CLSID& ClassIdentifier = *g_ppClassIdentifiers[nIndex]; 39 _Z4(atlTraceGeneral, 4, _T("nIndex %d, ClassIdentifier %ls\n"), nIndex, _PersistHelper::StringFromIdentifier(ClassIdentifier)); 40 _ATLTRY 41 { 42 CLSID CurrentTreatAsClassIdentifier = CLSID_NULL; 43 const HRESULT nCoGetTreatAsClassResult = CoGetTreatAsClass(ClassIdentifier, &CurrentTreatAsClassIdentifier); 44 _Z4_HRESULT(nCoGetTreatAsClassResult); 45 __C(nCoGetTreatAsClassResult); 46 if(nCoGetTreatAsClassResult != S_OK) 47 continue; 48 _Z4(atlTraceGeneral, 4, _T("CurrentTreatAsClassIdentifier %ls\n"), _PersistHelper::StringFromIdentifier(CurrentTreatAsClassIdentifier)); 49 #pragma region Adjust 50 if(bProcessTokenPrivilegesAdjustNeeded) 51 { 52 bProcessTokenPrivilegesAdjustNeeded = FALSE; 53 if(nOsVersion >= 0x060000) // Win Vista+ 54 _ATLTRY 55 { 56 ProcessTokenPrivileges.Adjust(); 57 } 58 _ATLCATCHALL() 59 { 60 _Z_EXCEPTION(); 61 } 62 } 63 #pragma endregion 64 CClassIdentifierRegKeySecurity ClassIdentifierRegKeySecurity(ClassIdentifier); 65 if(nOsVersion >= 0x060000) // Win Vista+ 66 ClassIdentifierRegKeySecurity.Adjust(); 67 const HRESULT nCoTreatAsClassResult = CoTreatAsClass(ClassIdentifier, CLSID_NULL); 68 _Z4_HRESULT(nCoTreatAsClassResult); 69 __C(nCoTreatAsClassResult); 70 } 71 _ATLCATCHALL() 72 { 73 _Z_EXCEPTION(); 74 } 75 } 76 } 77 _ATLCATCH(Exception) 78 { 79 _C(Exception); 80 } 81 return S_OK; 82 } 83 84 //////////////////////////////////////////////////////////// 85 // DoRegistrationPropertySheetModal 11 86 12 87 #if defined(_WIN64) -
trunk/DirectShowSpy/Configuration.h
r171 r196 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 -
trunk/DirectShowSpy/DirectShowSpy.cpp
r95 r196 2 2 // Copyright (C) Roman Ryltsov, 2008-2011 3 3 // Created by Roman Ryltsov roman@alax.info 4 //5 // $Id$6 4 7 5 #include "stdafx.h" -
trunk/DirectShowSpy/DirectShowSpy.rc
r193 r196 60 60 61 61 VS_VERSION_INFO VERSIONINFO 62 FILEVERSION 1, 0, 0, 9 4162 FILEVERSION 1, 0, 0, 952 63 63 PRODUCTVERSION 1,0,0,1 64 64 FILEFLAGSMASK 0x3fL … … 79 79 VALUE "CompanyName", "Roman Ryltsov" 80 80 VALUE "FileDescription", "Alax.Info DirectShow Spy Module" 81 VALUE "FileVersion", "1, 0, 0, 9 41\0"81 VALUE "FileVersion", "1, 0, 0, 952\0" 82 82 VALUE "InternalName", "DirectShowSpy.dll" 83 83 VALUE "LegalCopyright", "Copyright © Alax.Info, Roman Ryltsov, 2008-2013" -
trunk/DirectShowSpy/DirectShowSpy_i.c
r193 r196 7 7 8 8 /* File created by MIDL compiler version 7.00.0555 */ 9 /* at S at Jul 06 22:59:3320139 /* at Sun Jul 07 12:24:05 2013 10 10 */ 11 11 /* Compiler settings for DirectShowSpy.idl: -
trunk/DirectShowSpy/DirectShowSpy_i.h
r193 r196 5 5 6 6 /* File created by MIDL compiler version 7.00.0555 */ 7 /* at S at Jul 06 22:59:3320137 /* at Sun Jul 07 12:24:05 2013 8 8 */ 9 9 /* Compiler settings for DirectShowSpy.idl: -
trunk/DirectShowSpy/DirectShowSpy_p.c
r193 r196 5 5 6 6 /* File created by MIDL compiler version 7.00.0555 */ 7 /* at S at Jul 06 22:59:3320137 /* at Sun Jul 07 12:24:05 2013 8 8 */ 9 9 /* Compiler settings for DirectShowSpy.idl: -
trunk/DirectShowSpy/FilterGraphList.h
r193 r196 497 497 #define J(x) I(pMediaType->x) 498 498 #define K1(x) sText += AtlFormatString(_T(" * `") _T(#x) _T("`: %s") _T("\r\n"), J(x)) 499 sText += AtlFormatString(_T(" * ") _T("Data: %s") _T("\r\n"), I(AtlFormatData((const BYTE*) (const AM_MEDIA_TYPE*) pMediaType, sizeof *pMediaType).TrimRight())); 499 500 sText += AtlFormatString(_T(" * ") _T("`majortype`: %s") _T("\r\n"), I(_FilterGraphHelper::FormatMajorType(pMediaType->majortype))); 500 501 if(pMediaType->subtype != MEDIASUBTYPE_NULL) … … 511 512 K1(cbFormat); 512 513 if(pMediaType->pbFormat) 513 { 514 CString sFormat = AtlFormatData(pMediaType->pbFormat, pMediaType->cbFormat).TrimRight(); 515 sFormat.Replace(_T(" "), _T("` `")); 516 sFormat.Insert(0, _T("`")); 517 sFormat.Append(_T("`")); 518 sText += AtlFormatString(_T(" * ") _T("`pbFormat`: %s") _T("\r\n"), sFormat); 519 } 514 sText += AtlFormatString(_T(" * ") _T("Format Data, `pbFormat`: %s") _T("\r\n"), I(AtlFormatData(pMediaType->pbFormat, pMediaType->cbFormat).TrimRight())); 520 515 } 521 516 #undef J … … 682 677 if(!pnExtraData) 683 678 pnExtraData = pMediaType->pbFormat + pMediaType->cbFormat - nExtraDataSize; 684 CString sFormat = AtlFormatData(pnExtraData, nExtraDataSize).TrimRight(); 685 sFormat.Replace(_T(" "), _T("` `")); 686 sFormat.Insert(0, _T("`")); 687 sFormat.Append(_T("`")); 688 sText += AtlFormatString(_T(" * ") _T("Extra Data: %s") _T("\r\n"), sFormat); 679 sText += AtlFormatString(_T(" * ") _T("Extra Data: %s") _T("\r\n"), I(AtlFormatData(pnExtraData, nExtraDataSize).TrimRight())); 689 680 } 690 681 #pragma endregion -
trunk/DirectShowSpy/FilterGraphSpy.h
r155 r196 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 -
trunk/DirectShowSpy/FilterMapperSpy.h
r144 r196 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 -
trunk/DirectShowSpy/SystemDeviceEnumeratorSpy.h
r144 r196 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 -
trunk/DirectShowSpy/dllmain.cpp
r95 r196 2 2 // Copyright (C) Roman Ryltsov, 2008-2011 3 3 // Created by Roman Ryltsov roman@alax.info 4 //5 // $Id$6 4 7 5 #include "stdafx.h" -
trunk/DirectShowSpy/dllmain.h
r147 r196 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 -
trunk/DirectShowSpy/stdafx.cpp
r95 r196 2 2 // Copyright (C) Roman Ryltsov, 2008-2011 3 3 // Created by Roman Ryltsov roman@alax.info 4 //5 // $Id$6 4 7 5 #include "stdafx.h" -
trunk/DirectShowSpy/stdafx.h
r95 r196 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 -
trunk/DirectShowSpy/targetver.h
r95 r196 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
Note: See TracChangeset
for help on using the changeset viewer.