Changeset 144 for trunk


Ignore:
Timestamp:
Nov 17, 2012, 3:15:58 AM (11 years ago)
Author:
roman
Message:
  • hooking and tracing device enumerator calls
  • minor updates
Location:
trunk/DirectShowSpy
Files:
2 added
3 deleted
15 edited

Legend:

Unmodified
Added
Removed
  • trunk/DirectShowSpy/BdaHooks

    • Property svn:ignore
      •  

        old new  
        11*.user
         2*.aps
  • trunk/DirectShowSpy/BdaHooks/BdaHooks.rc

    r98 r144  
    6363
    6464VS_VERSION_INFO VERSIONINFO
    65  FILEVERSION  1, 0, 0, 76
     65 FILEVERSION  1, 0, 0, 119
    6666 PRODUCTVERSION 1,0,0,1
    6767 FILEFLAGSMASK 0x3fL
     
    8282            VALUE "CompanyName", "Roman Ryltsov"
    8383            VALUE "FileDescription", "Alax.Info DirectShow Filter Graph Spy Module"
    84             VALUE "FileVersion",  "1, 0, 0, 76\0"
     84            VALUE "FileVersion",  "1, 0, 0, 119\0"
    8585            VALUE "LegalCopyright", "Copyright © Alax.Info, Roman Ryltsov, 2008-2009"
    8686            VALUE "OLESelfRegister", "Yes"
  • trunk/DirectShowSpy/BdaHooks/BdaHooks_i.c

    r98 r144  
    77
    88 /* File created by MIDL compiler version 7.00.0500 */
    9 /* at Mon Aug 20 23:06:17 2012
     9/* at Sat Nov 17 01:35:26 2012
    1010 */
    1111/* Compiler settings for .\BdaHooks.idl:
  • trunk/DirectShowSpy/BdaHooks/BdaHooks_i.h

    r98 r144  
    55
    66 /* File created by MIDL compiler version 7.00.0500 */
    7 /* at Mon Aug 20 23:06:17 2012
     7/* at Sat Nov 17 01:35:26 2012
    88 */
    99/* Compiler settings for .\BdaHooks.idl:
  • trunk/DirectShowSpy/BdaHooks/BdaHooks_p.c

    r98 r144  
    55
    66 /* File created by MIDL compiler version 7.00.0500 */
    7 /* at Mon Aug 20 23:06:17 2012
     7/* at Sat Nov 17 01:35:26 2012
    88 */
    99/* Compiler settings for .\BdaHooks.idl:
  • trunk/DirectShowSpy/DirectShowSpy.idl

    r95 r144  
    3030]
    3131interface IFilterMapperSpy : IDispatch
     32{
     33};
     34[
     35        object,
     36        uuid(14EB119F-25CE-4654-ABE1-E6742AF03F2D),
     37        dual,
     38        oleautomation,
     39        nonextensible,
     40        helpstring("ISystemDeviceEnumeratorSpy Interface"),
     41        pointer_default(unique)
     42]
     43interface ISystemDeviceEnumeratorSpy : IDispatch
    3244{
    3345};
     
    106118                [default] interface IFilterMapperSpy;
    107119        };
     120        [
     121                uuid(AD42E3BD-7B9B-4783-9DA2-61A9ACD0D4D2),
     122                helpstring("SystemDeviceEnumeratorSpy Class")
     123        ]
     124        coclass SystemDeviceEnumeratorSpy
     125        {
     126                [default] interface ISystemDeviceEnumeratorSpy;
     127        };
    108128};
  • trunk/DirectShowSpy/DirectShowSpy.rc

    r98 r144  
    6262
    6363VS_VERSION_INFO VERSIONINFO
    64  FILEVERSION  1, 0, 0, 647
     64 FILEVERSION  1, 0, 0, 708
    6565 PRODUCTVERSION 1,0,0,1
    6666 FILEFLAGSMASK 0x3fL
     
    8181            VALUE "CompanyName", "Roman Ryltsov"
    8282            VALUE "FileDescription", "Alax.Info DirectShow Spy Module"
    83             VALUE "FileVersion",  "1, 0, 0, 647\0"
     83            VALUE "FileVersion",  "1, 0, 0, 708\0"
    8484            VALUE "InternalName", "DirectShowSpy.dll"
    8585            VALUE "LegalCopyright", "Copyright © Alax.Info, Roman Ryltsov, 2008-2011"
     
    103103
    104104IDR_MODULE              REGISTRY                "DirectShowSpy.rgs"
    105 IDR_FILTERGRAPHSPY      REGISTRY                "FilterGraphSpy.rgs"
    106 IDR_NOTHREADFILTERGRAPHSPY REGISTRY                "FilterGraphSpy.rgs"
    107 IDR_FILTERMAPPERSPY     REGISTRY                "FilterMapperSpy.rgs"
     105IDR_FILTERGRAPHSPY      REGISTRY                "GenericClass.rgs"
     106IDR_NOTHREADFILTERGRAPHSPY REGISTRY                "GenericClass.rgs"
     107IDR_FILTERMAPPERSPY     REGISTRY                "GenericClass.rgs"
     108IDR_SYSTEMDEVICEENUMERATORSPY REGISTRY                "GenericClass.rgs"
    108109
    109110/////////////////////////////////////////////////////////////////////////////
     
    191192                            "\n\nAlax.Info DirectShow Filter Graph (No Thread) Spy\n"
    192193    IDR_FILTERMAPPERSPY     "\n\nAlax.Info DirectShow Filter Mapper Spy\n"
     194        IDR_SYSTEMDEVICEENUMERATORSPY "\n\nAlax.Info DirectShow System Device Enumerator Spy\n"
    193195END
    194196
  • trunk/DirectShowSpy/DirectShowSpy.vcproj

    r95 r144  
    767767                        </File>
    768768                        <File
     769                                RelativePath=".\SystemDeviceEnumeratorSpy.h"
     770                                >
     771                        </File>
     772                        <File
    769773                                RelativePath=".\targetver.h"
    770774                                >
     
    888892                        </File>
    889893                </Filter>
    890                 <File
    891                         RelativePath=".\ReadMe.txt"
    892                         >
    893                 </File>
    894894        </Files>
    895895        <Globals>
  • trunk/DirectShowSpy/DirectShowSpy_i.c

    r98 r144  
    77
    88 /* File created by MIDL compiler version 7.00.0500 */
    9 /* at Wed Aug 22 01:07:15 2012
     9/* at Sat Nov 17 01:35:16 2012
    1010 */
    1111/* Compiler settings for .\DirectShowSpy.idl:
     
    7474
    7575
     76MIDL_DEFINE_GUID(IID, IID_ISystemDeviceEnumeratorSpy,0x14EB119F,0x25CE,0x4654,0xAB,0xE1,0xE6,0x74,0x2A,0xF0,0x3F,0x2D);
     77
     78
    7679MIDL_DEFINE_GUID(IID, LIBID_AlaxInfoDirectShowSpy,0xB9EC374B,0x834B,0x4DA9,0xBF,0xB5,0xC1,0x87,0x2C,0xE7,0x36,0xFF);
    7780
     
    9497MIDL_DEFINE_GUID(CLSID, CLSID_FilterMapperSpy,0xB6274D9B,0x1AD3,0x4c32,0x83,0xC5,0x35,0xDC,0x33,0xCA,0xFF,0x47);
    9598
     99
     100MIDL_DEFINE_GUID(CLSID, CLSID_SystemDeviceEnumeratorSpy,0xAD42E3BD,0x7B9B,0x4783,0x9D,0xA2,0x61,0xA9,0xAC,0xD0,0xD4,0xD2);
     101
    96102#undef MIDL_DEFINE_GUID
    97103
  • trunk/DirectShowSpy/DirectShowSpy_i.h

    r98 r144  
    55
    66 /* File created by MIDL compiler version 7.00.0500 */
    7 /* at Wed Aug 22 01:07:15 2012
     7/* at Sat Nov 17 01:35:16 2012
    88 */
    99/* Compiler settings for .\DirectShowSpy.idl:
     
    5858
    5959
     60#ifndef __ISystemDeviceEnumeratorSpy_FWD_DEFINED__
     61#define __ISystemDeviceEnumeratorSpy_FWD_DEFINED__
     62typedef interface ISystemDeviceEnumeratorSpy ISystemDeviceEnumeratorSpy;
     63#endif  /* __ISystemDeviceEnumeratorSpy_FWD_DEFINED__ */
     64
     65
    6066#ifndef __IFilterGraphAddRemoveHook_FWD_DEFINED__
    6167#define __IFilterGraphAddRemoveHook_FWD_DEFINED__
     
    110116
    111117#endif  /* __FilterMapperSpy_FWD_DEFINED__ */
     118
     119
     120#ifndef __SystemDeviceEnumeratorSpy_FWD_DEFINED__
     121#define __SystemDeviceEnumeratorSpy_FWD_DEFINED__
     122
     123#ifdef __cplusplus
     124typedef class SystemDeviceEnumeratorSpy SystemDeviceEnumeratorSpy;
     125#else
     126typedef struct SystemDeviceEnumeratorSpy SystemDeviceEnumeratorSpy;
     127#endif /* __cplusplus */
     128
     129#endif  /* __SystemDeviceEnumeratorSpy_FWD_DEFINED__ */
    112130
    113131
     
    343361
    344362
     363#ifndef __ISystemDeviceEnumeratorSpy_INTERFACE_DEFINED__
     364#define __ISystemDeviceEnumeratorSpy_INTERFACE_DEFINED__
     365
     366/* interface ISystemDeviceEnumeratorSpy */
     367/* [unique][helpstring][nonextensible][oleautomation][dual][uuid][object] */
     368
     369
     370EXTERN_C const IID IID_ISystemDeviceEnumeratorSpy;
     371
     372#if defined(__cplusplus) && !defined(CINTERFACE)
     373   
     374    MIDL_INTERFACE("14EB119F-25CE-4654-ABE1-E6742AF03F2D")
     375    ISystemDeviceEnumeratorSpy : public IDispatch
     376    {
     377    public:
     378    };
     379   
     380#else   /* C style interface */
     381
     382    typedef struct ISystemDeviceEnumeratorSpyVtbl
     383    {
     384        BEGIN_INTERFACE
     385       
     386        HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
     387            ISystemDeviceEnumeratorSpy * This,
     388            /* [in] */ REFIID riid,
     389            /* [iid_is][out] */
     390            __RPC__deref_out  void **ppvObject);
     391       
     392        ULONG ( STDMETHODCALLTYPE *AddRef )(
     393            ISystemDeviceEnumeratorSpy * This);
     394       
     395        ULONG ( STDMETHODCALLTYPE *Release )(
     396            ISystemDeviceEnumeratorSpy * This);
     397       
     398        HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )(
     399            ISystemDeviceEnumeratorSpy * This,
     400            /* [out] */ UINT *pctinfo);
     401       
     402        HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )(
     403            ISystemDeviceEnumeratorSpy * This,
     404            /* [in] */ UINT iTInfo,
     405            /* [in] */ LCID lcid,
     406            /* [out] */ ITypeInfo **ppTInfo);
     407       
     408        HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )(
     409            ISystemDeviceEnumeratorSpy * This,
     410            /* [in] */ REFIID riid,
     411            /* [size_is][in] */ LPOLESTR *rgszNames,
     412            /* [range][in] */ UINT cNames,
     413            /* [in] */ LCID lcid,
     414            /* [size_is][out] */ DISPID *rgDispId);
     415       
     416        /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )(
     417            ISystemDeviceEnumeratorSpy * This,
     418            /* [in] */ DISPID dispIdMember,
     419            /* [in] */ REFIID riid,
     420            /* [in] */ LCID lcid,
     421            /* [in] */ WORD wFlags,
     422            /* [out][in] */ DISPPARAMS *pDispParams,
     423            /* [out] */ VARIANT *pVarResult,
     424            /* [out] */ EXCEPINFO *pExcepInfo,
     425            /* [out] */ UINT *puArgErr);
     426       
     427        END_INTERFACE
     428    } ISystemDeviceEnumeratorSpyVtbl;
     429
     430    interface ISystemDeviceEnumeratorSpy
     431    {
     432        CONST_VTBL struct ISystemDeviceEnumeratorSpyVtbl *lpVtbl;
     433    };
     434
     435   
     436
     437#ifdef COBJMACROS
     438
     439
     440#define ISystemDeviceEnumeratorSpy_QueryInterface(This,riid,ppvObject)  \
     441    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
     442
     443#define ISystemDeviceEnumeratorSpy_AddRef(This) \
     444    ( (This)->lpVtbl -> AddRef(This) )
     445
     446#define ISystemDeviceEnumeratorSpy_Release(This)        \
     447    ( (This)->lpVtbl -> Release(This) )
     448
     449
     450#define ISystemDeviceEnumeratorSpy_GetTypeInfoCount(This,pctinfo)       \
     451    ( (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) )
     452
     453#define ISystemDeviceEnumeratorSpy_GetTypeInfo(This,iTInfo,lcid,ppTInfo)        \
     454    ( (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) )
     455
     456#define ISystemDeviceEnumeratorSpy_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId)      \
     457    ( (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) )
     458
     459#define ISystemDeviceEnumeratorSpy_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr)        \
     460    ( (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) )
     461
     462
     463#endif /* COBJMACROS */
     464
     465
     466#endif  /* C style interface */
     467
     468
     469
     470
     471#endif  /* __ISystemDeviceEnumeratorSpy_INTERFACE_DEFINED__ */
     472
     473
    345474
    346475#ifndef __AlaxInfoDirectShowSpy_LIBRARY_DEFINED__
     
    765894FilterMapperSpy;
    766895#endif
     896
     897EXTERN_C const CLSID CLSID_SystemDeviceEnumeratorSpy;
     898
     899#ifdef __cplusplus
     900
     901class DECLSPEC_UUID("AD42E3BD-7B9B-4783-9DA2-61A9ACD0D4D2")
     902SystemDeviceEnumeratorSpy;
     903#endif
    767904#endif /* __AlaxInfoDirectShowSpy_LIBRARY_DEFINED__ */
    768905
  • trunk/DirectShowSpy/DirectShowSpy_p.c

    r98 r144  
    55
    66 /* File created by MIDL compiler version 7.00.0500 */
    7 /* at Wed Aug 22 01:07:15 2012
     7/* at Sat Nov 17 01:35:16 2012
    88 */
    99/* Compiler settings for .\DirectShowSpy.idl:
     
    9898
    9999
     100extern const MIDL_STUB_DESC Object_StubDesc;
     101
     102
     103extern const MIDL_SERVER_INFO ISystemDeviceEnumeratorSpy_ServerInfo;
     104extern const MIDL_STUBLESS_PROXY_INFO ISystemDeviceEnumeratorSpy_ProxyInfo;
     105
     106
    100107
    101108#if !defined(__RPC_WIN32__)
     
    270277};
    271278
     279
     280/* Object interface: ISystemDeviceEnumeratorSpy, ver. 0.0,
     281   GUID={0x14EB119F,0x25CE,0x4654,{0xAB,0xE1,0xE6,0x74,0x2A,0xF0,0x3F,0x2D}} */
     282
     283#pragma code_seg(".orpc")
     284static const unsigned short ISystemDeviceEnumeratorSpy_FormatStringOffsetTable[] =
     285    {
     286    (unsigned short) -1,
     287    (unsigned short) -1,
     288    (unsigned short) -1,
     289    (unsigned short) -1,
     290    0
     291    };
     292
     293static const MIDL_STUBLESS_PROXY_INFO ISystemDeviceEnumeratorSpy_ProxyInfo =
     294    {
     295    &Object_StubDesc,
     296    DirectShowSpy__MIDL_ProcFormatString.Format,
     297    &ISystemDeviceEnumeratorSpy_FormatStringOffsetTable[-3],
     298    0,
     299    0,
     300    0
     301    };
     302
     303
     304static const MIDL_SERVER_INFO ISystemDeviceEnumeratorSpy_ServerInfo =
     305    {
     306    &Object_StubDesc,
     307    0,
     308    DirectShowSpy__MIDL_ProcFormatString.Format,
     309    &ISystemDeviceEnumeratorSpy_FormatStringOffsetTable[-3],
     310    0,
     311    0,
     312    0,
     313    0};
     314CINTERFACE_PROXY_VTABLE(7) _ISystemDeviceEnumeratorSpyProxyVtbl =
     315{
     316    0,
     317    &IID_ISystemDeviceEnumeratorSpy,
     318    IUnknown_QueryInterface_Proxy,
     319    IUnknown_AddRef_Proxy,
     320    IUnknown_Release_Proxy ,
     321    0 /* (void *) (INT_PTR) -1 /* IDispatch::GetTypeInfoCount */ ,
     322    0 /* (void *) (INT_PTR) -1 /* IDispatch::GetTypeInfo */ ,
     323    0 /* (void *) (INT_PTR) -1 /* IDispatch::GetIDsOfNames */ ,
     324    0 /* IDispatch_Invoke_Proxy */
     325};
     326
     327
     328static const PRPC_STUB_FUNCTION ISystemDeviceEnumeratorSpy_table[] =
     329{
     330    STUB_FORWARDING_FUNCTION,
     331    STUB_FORWARDING_FUNCTION,
     332    STUB_FORWARDING_FUNCTION,
     333    STUB_FORWARDING_FUNCTION
     334};
     335
     336CInterfaceStubVtbl _ISystemDeviceEnumeratorSpyStubVtbl =
     337{
     338    &IID_ISystemDeviceEnumeratorSpy,
     339    &ISystemDeviceEnumeratorSpy_ServerInfo,
     340    7,
     341    &ISystemDeviceEnumeratorSpy_table[-3],
     342    CStdStubBuffer_DELEGATING_METHODS
     343};
     344
    272345static const MIDL_STUB_DESC Object_StubDesc =
    273346    {
     
    297370{
    298371    ( CInterfaceProxyVtbl *) &_ISpyProxyVtbl,
     372    ( CInterfaceProxyVtbl *) &_ISystemDeviceEnumeratorSpyProxyVtbl,
    299373    ( CInterfaceProxyVtbl *) &_IFilterMapperSpyProxyVtbl,
    300374    0
     
    304378{
    305379    ( CInterfaceStubVtbl *) &_ISpyStubVtbl,
     380    ( CInterfaceStubVtbl *) &_ISystemDeviceEnumeratorSpyStubVtbl,
    306381    ( CInterfaceStubVtbl *) &_IFilterMapperSpyStubVtbl,
    307382    0
     
    311386{
    312387    "ISpy",
     388    "ISystemDeviceEnumeratorSpy",
    313389    "IFilterMapperSpy",
    314390    0
     
    319395    &IID_IDispatch,
    320396    &IID_IDispatch,
     397    &IID_IDispatch,
    321398    0
    322399};
     
    329406    IID_BS_LOOKUP_SETUP
    330407
    331     IID_BS_LOOKUP_INITIAL_TEST( _DirectShowSpy, 2, 1 )
    332     IID_BS_LOOKUP_RETURN_RESULT( _DirectShowSpy, 2, *pIndex )
     408    IID_BS_LOOKUP_INITIAL_TEST( _DirectShowSpy, 3, 2 )
     409    IID_BS_LOOKUP_NEXT_TEST( _DirectShowSpy, 1 )
     410    IID_BS_LOOKUP_RETURN_RESULT( _DirectShowSpy, 3, *pIndex )
    333411   
    334412}
     
    341419    (const IID ** ) & _DirectShowSpy_BaseIIDList,
    342420    & _DirectShowSpy_IID_Lookup,
    343     2,
     421    3,
    344422    2,
    345423    0, /* table of [async_uuid] interfaces */
  • trunk/DirectShowSpy/FilterGraphSpy.cpp

    r95 r144  
    1010#include "FilterMapperSpy.h"
    1111#include "GraphBuilderCallbackPropertySheet.h"
     12#include "SystemDeviceEnumeratorSpy.h"
    1213
    1314////////////////////////////////////////////////////////////
  • trunk/DirectShowSpy/FilterMapperSpy.h

    r95 r144  
    104104                m_hQuartzModule(NULL)
    105105        {
    106                 _Z4(atlTraceRefcount, 4, _T("this 0x%08x\n"), this);
     106                _Z4(atlTraceRefcount, 4, _T("this 0x%p\n"), this);
    107107        }
    108108        ~CFilterMapperSpyT() throw()
    109109        {
    110                 _Z4(atlTraceRefcount, 4, _T("this 0x%08x\n"), this);
     110                _Z4(atlTraceRefcount, 4, _T("this 0x%p\n"), this);
    111111        }
    112112        HRESULT FinalConstruct() throw()
     
    118118                        _W(GetModuleFileName(NULL, pszPath, DIM(pszPath)));
    119119                        _Z4(atlTraceRefcount, 4, _T("pszPath \"%s\", this 0x%08x, m_dwRef %d, m_bIsAggregated %d\n"), pszPath, this, m_dwRef, m_bIsAggregated);
    120                         const HINSTANCE hModule = CoLoadLibrary(_T("quartz.dll"), TRUE);
     120                        const HINSTANCE hModule = CoLoadLibrary(const_cast<LPOLESTR>((LPCOLESTR) CT2COLE(GetOriginalLibraryName())), TRUE);
    121121                        _ATLTRY
    122122                        {
  • trunk/DirectShowSpy/dllmain.h

    r95 r144  
    2828                _W(CExceptionFilter::Initialize());
    2929                TraceModuleVersion();
    30                 _Z4(atlTraceRefcount, 4, _T("this 0x%08x\n"), this);
     30                _Z4(atlTraceRefcount, 4, _T("this 0x%p\n"), this);
    3131        }
    3232        ~CDirectShowSpyModule() throw()
    3333        {
    34                 _Z4(atlTraceRefcount, 4, _T("this 0x%08x\n"), this);
     34                _Z4(atlTraceRefcount, 4, _T("this 0x%p\n"), this);
    3535                CExceptionFilter::Terminate();
    3636        }
  • trunk/DirectShowSpy/resource.h

    r95 r144  
    1111#define IDR_NOTHREADFILTERGRAPHSPY      103
    1212#define IDR_FILTERMAPPERSPY             104
     13#define IDR_SYSTEMDEVICEENUMERATORSPY   105
    1314#define IDC_PROGRESS                    202
    1415#define IDS_GRAPHBUILDERCALLBACK_GRAPH_PROPERTYSHEETCAPTION 1000
Note: See TracChangeset for help on using the changeset viewer.