Author: alax
(2009/11/02 08:16) Over 2 years ago
64-bit version, hooks, BDA hook project
11
object,
12
uuid(6945711B-FE0F-4C54-965F-5B67969C28B7),
13
dual,
14
oleautomation,
nonextensible,
15
helpstring("ISpy Interface"),
16
pointer_default(unique)
17
...
27
{
28
importlib("stdole2.tlb");
29
[
30
31
32
uuid(ACBECDFD-D8CA-49c8-B799-D23225D5BFAD),
33
34
helpstring("IFilterGraphAddRemoveHook Interface"),
35
36
]
37
interface IFilterGraphAddRemoveHook : IUnknown
38
39
HRESULT OnAddFilter([in] ISpy* pSpy, [in] IUnknown* pBaseFilterUnknown, [in] LPCWSTR pszName, [in, out] BOOL* pbDefault);
40
HRESULT OnRemoveFilter([in] ISpy* pSpy, [in] IUnknown* pBaseFilterUnknown, [in, out] BOOL* pbDefault);
41
HRESULT OnAddSourceFilter([in] ISpy* pSpy, [in] LPCWSTR pszFileName, [in] LPCWSTR pszFilterName, [out] IUnknown** ppBaseFilterUnknown, [in, out] BOOL* pbDefault);
42
HRESULT OnAddSourceFilterForMoniker([in] ISpy* pSpy, [in] IUnknown* pMonikerUnknown, [in] IUnknown* pBindCtxUnknown, [in] LPCWSTR pszFilterName, [out] IUnknown** ppBaseFilterUnknown, [in, out] BOOL* pbDefault);
43
};
44
45
46
uuid(D0F4C168-D09D-481e-903D-7461CE69E391),
47
48
helpstring("IFilterGraphConnectHook Interface"),
49
50
51
interface IFilterGraphConnectHook : IUnknown
52
53
HRESULT OnConnectDirect([in] ISpy* pSpy, [in] IUnknown* pOutputPinUnknown, [in] IUnknown* pInputPinUnknown, [in] const BYTE* pMediaTypeData, [in, out] BOOL* pbDefault);
54
HRESULT OnReconnect([in] ISpy* pSpy, [in] IUnknown* pPinUnknown, [in, out] BOOL* pbDefault);
55
HRESULT OnDisconnect([in] ISpy* pSpy, [in] IUnknown* pPinUnknown, [in, out] BOOL* pbDefault);
56
HRESULT OnConnect([in] ISpy* pSpy, [in] IUnknown* pOutputPinUnknown, [in] IUnknown* pInputPinUnknown, [in, out] BOOL* pbDefault);
57
HRESULT OnReconnectEx([in] ISpy* pSpy, [in] IUnknown* pPinUnknown, [in] const BYTE* pMediaTypeData, [in, out] BOOL* pbDefault);
58
59
60
61
uuid(65FA1519-A935-4fa9-A15D-9426457E02F6),
62
63
helpstring("IFilterGraphStateControlHook Interface"),
64
65
66
interface IFilterGraphStateControlHook : IUnknown
67
68
HRESULT OnRun([in] ISpy* pSpy, [in, out] BOOL* pbDefault);
69
HRESULT OnPause([in] ISpy* pSpy, [in, out] BOOL* pbDefault);
70
HRESULT OnStop([in] ISpy* pSpy, [in, out] BOOL* pbDefault);
71
72
uuid(F552C23D-F088-41C3-A080-8464D7BB9BAD),
73
helpstring("Spy Class")
74
75
#endif
#include "winres.h"
#include "atlres.h"
#include "rores.rc"
/////////////////////////////////////////////////////////////////////////////
18
#undef APSTUDIO_READONLY_SYMBOLS
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1, 0, 0, 134
FILEVERSION 1, 0, 0, 201
PRODUCTVERSION 1,0,0,1
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
80
VALUE "Comments", "Created by Roman Ryltsov roman@alax.info"
81
VALUE "CompanyName", "Roman Ryltsov"
82
VALUE "FileDescription", "Alax.Info DirectShow Filter Graph Spy Module"
83
VALUE "FileVersion", "1, 0, 0, 134\0"
VALUE "FileVersion", "1, 0, 0, 201"
84
VALUE "InternalName", "FilterGraphSpy.dll"
85
VALUE "LegalCopyright", "Copyright © Alax.Info, Roman Ryltsov, 2008-2009"
86
VALUE "OLESelfRegister", "Yes"
127
128
// Generated from the TEXTINCLUDE 3 resource.
129
130
1 TYPELIB "FilterGraphSpy.tlb"
131
132
133
#endif // not APSTUDIO_INVOKED
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TakeRegistryKeyOwnership", "TakeRegistryKeyOwnership\TakeRegistryKeyOwnership.vcproj", "{853F01C8-5703-4927-AAC7-0871A0940740}"
19
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BdaHooks", "BdaHooks\BdaHooks.vcproj", "{42B74EE4-45E2-44E8-B3EE-6061DBCDD86D}"
20
ProjectSection(ProjectDependencies) = postProject
21
{1A5DA4E5-ED09-476A-9A42-538D0DDA3FB9} = {1A5DA4E5-ED09-476A-9A42-538D0DDA3FB9}
22
EndProjectSection
23
Global
24
GlobalSection(SolutionConfigurationPlatforms) = preSolution
25
Debug|Win32 = Debug|Win32
26
Debug|x64 = Debug|x64
Release Trace|Win32 = Release Trace|Win32
Release Trace|x64 = Release Trace|x64
Release|Win32 = Release|Win32
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{1A5DA4E5-ED09-476A-9A42-538D0DDA3FB9}.Debug|Win32.ActiveCfg = Debug|Win32
{1A5DA4E5-ED09-476A-9A42-538D0DDA3FB9}.Debug|Win32.Build.0 = Debug|Win32
{1A5DA4E5-ED09-476A-9A42-538D0DDA3FB9}.Debug|x64.ActiveCfg = Debug|x64
{1A5DA4E5-ED09-476A-9A42-538D0DDA3FB9}.Release Trace|Win32.ActiveCfg = Release Trace|Win32
{1A5DA4E5-ED09-476A-9A42-538D0DDA3FB9}.Release Trace|Win32.Build.0 = Release Trace|Win32
{1A5DA4E5-ED09-476A-9A42-538D0DDA3FB9}.Release Trace|x64.ActiveCfg = Release Trace|x64
{1A5DA4E5-ED09-476A-9A42-538D0DDA3FB9}.Release Trace|x64.Build.0 = Release Trace|x64
{1A5DA4E5-ED09-476A-9A42-538D0DDA3FB9}.Release|Win32.ActiveCfg = Release|Win32
{1A5DA4E5-ED09-476A-9A42-538D0DDA3FB9}.Release|x64.ActiveCfg = Release|x64
{E0A3323D-478E-4046-909A-AD12AD399A68}.Debug|Win32.ActiveCfg = Debug|Win32
{E0A3323D-478E-4046-909A-AD12AD399A68}.Debug|x64.ActiveCfg = Debug|Win32
{E0A3323D-478E-4046-909A-AD12AD399A68}.Release Trace|Win32.ActiveCfg = Release|Win32
{E0A3323D-478E-4046-909A-AD12AD399A68}.Release Trace|x64.ActiveCfg = Release|Win32
{E0A3323D-478E-4046-909A-AD12AD399A68}.Release|Win32.ActiveCfg = Release|Win32
{E0A3323D-478E-4046-909A-AD12AD399A68}.Release|x64.ActiveCfg = Release|Win32
{F7ED386C-A3F0-4B7D-ABBD-D0364FB44DAC}.Debug|Win32.ActiveCfg = Debug
{F7ED386C-A3F0-4B7D-ABBD-D0364FB44DAC}.Debug|x64.ActiveCfg = Debug
{F7ED386C-A3F0-4B7D-ABBD-D0364FB44DAC}.Release Trace|Win32.ActiveCfg = Release
{F7ED386C-A3F0-4B7D-ABBD-D0364FB44DAC}.Release Trace|Win32.Build.0 = Release
{F7ED386C-A3F0-4B7D-ABBD-D0364FB44DAC}.Release Trace|x64.ActiveCfg = Release
{F7ED386C-A3F0-4B7D-ABBD-D0364FB44DAC}.Release Trace|x64.Build.0 = Release
{F7ED386C-A3F0-4B7D-ABBD-D0364FB44DAC}.Release|Win32.ActiveCfg = Release
{F7ED386C-A3F0-4B7D-ABBD-D0364FB44DAC}.Release|x64.ActiveCfg = Release
{27D9723B-C970-4185-A448-0E46EBCA0E7A}.Debug|Win32.ActiveCfg = Debug|Win32
{27D9723B-C970-4185-A448-0E46EBCA0E7A}.Debug|x64.ActiveCfg = Debug|x64
{27D9723B-C970-4185-A448-0E46EBCA0E7A}.Release Trace|Win32.ActiveCfg = Release|Win32
{27D9723B-C970-4185-A448-0E46EBCA0E7A}.Release Trace|Win32.Build.0 = Release|Win32
{27D9723B-C970-4185-A448-0E46EBCA0E7A}.Release Trace|x64.ActiveCfg = Release|x64
{27D9723B-C970-4185-A448-0E46EBCA0E7A}.Release Trace|x64.Build.0 = Release|x64
{27D9723B-C970-4185-A448-0E46EBCA0E7A}.Release|Win32.ActiveCfg = Release|Win32
{27D9723B-C970-4185-A448-0E46EBCA0E7A}.Release|x64.ActiveCfg = Release|x64
{F6797714-CC58-4579-A17E-CCB7EE82CBC7}.Debug|Win32.ActiveCfg = Debug|Win32
{F6797714-CC58-4579-A17E-CCB7EE82CBC7}.Debug|Win32.Build.0 = Debug|Win32
{F6797714-CC58-4579-A17E-CCB7EE82CBC7}.Debug|x64.ActiveCfg = Debug|Win32
{F6797714-CC58-4579-A17E-CCB7EE82CBC7}.Debug|x64.Build.0 = Debug|Win32
{F6797714-CC58-4579-A17E-CCB7EE82CBC7}.Release Trace|Win32.ActiveCfg = Release|Win32
{F6797714-CC58-4579-A17E-CCB7EE82CBC7}.Release Trace|Win32.Build.0 = Release|Win32
{F6797714-CC58-4579-A17E-CCB7EE82CBC7}.Release Trace|x64.ActiveCfg = Release|Win32
{F6797714-CC58-4579-A17E-CCB7EE82CBC7}.Release Trace|x64.Build.0 = Release|Win32
{F6797714-CC58-4579-A17E-CCB7EE82CBC7}.Release|Win32.ActiveCfg = Release|Win32
{F6797714-CC58-4579-A17E-CCB7EE82CBC7}.Release|Win32.Build.0 = Release|Win32
{F6797714-CC58-4579-A17E-CCB7EE82CBC7}.Release|x64.ActiveCfg = Release|Win32
76
{F6797714-CC58-4579-A17E-CCB7EE82CBC7}.Release|x64.Build.0 = Release|Win32
{853F01C8-5703-4927-AAC7-0871A0940740}.Debug|Win32.ActiveCfg = Debug|Win32
77
{853F01C8-5703-4927-AAC7-0871A0940740}.Debug|Win32.Build.0 = Debug|Win32
78
79
{853F01C8-5703-4927-AAC7-0871A0940740}.Debug|x64.ActiveCfg = Debug|Win32
{853F01C8-5703-4927-AAC7-0871A0940740}.Debug|x64.Build.0 = Debug|Win32
{853F01C8-5703-4927-AAC7-0871A0940740}.Release Trace|Win32.ActiveCfg = Release|Win32
{853F01C8-5703-4927-AAC7-0871A0940740}.Release Trace|Win32.Build.0 = Release|Win32
{853F01C8-5703-4927-AAC7-0871A0940740}.Release Trace|x64.ActiveCfg = Release|Win32
{853F01C8-5703-4927-AAC7-0871A0940740}.Release Trace|x64.Build.0 = Release|Win32
{853F01C8-5703-4927-AAC7-0871A0940740}.Release|Win32.ActiveCfg = Release|Win32
{853F01C8-5703-4927-AAC7-0871A0940740}.Release|Win32.Build.0 = Release|Win32
87
{853F01C8-5703-4927-AAC7-0871A0940740}.Release|x64.ActiveCfg = Release|Win32
88
{853F01C8-5703-4927-AAC7-0871A0940740}.Release|x64.Build.0 = Release|Win32
89
{42B74EE4-45E2-44E8-B3EE-6061DBCDD86D}.Debug|Win32.ActiveCfg = Debug|Win32
90
{42B74EE4-45E2-44E8-B3EE-6061DBCDD86D}.Debug|Win32.Build.0 = Debug|Win32
91
{42B74EE4-45E2-44E8-B3EE-6061DBCDD86D}.Debug|x64.ActiveCfg = Debug|x64
92
{42B74EE4-45E2-44E8-B3EE-6061DBCDD86D}.Release Trace|Win32.ActiveCfg = Release|Win32
93
{42B74EE4-45E2-44E8-B3EE-6061DBCDD86D}.Release Trace|Win32.Build.0 = Release|Win32
94
{42B74EE4-45E2-44E8-B3EE-6061DBCDD86D}.Release Trace|x64.ActiveCfg = Release|x64
95
{42B74EE4-45E2-44E8-B3EE-6061DBCDD86D}.Release|Win32.ActiveCfg = Release|Win32
96
{42B74EE4-45E2-44E8-B3EE-6061DBCDD86D}.Release|Win32.Build.0 = Release|Win32
97
{42B74EE4-45E2-44E8-B3EE-6061DBCDD86D}.Release|x64.ActiveCfg = Release|x64
98
GlobalSection(SolutionProperties) = preSolution
99
HideSolutionNode = FALSE
100
<Platform
Name="Win32"
/>
Name="x64"
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="$(ConfigurationName)"
OutputDirectory="$(SolutionDir)$(ConfigurationName)\$(PlatformName)"
IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
IntermediateDirectory="$(SolutionDir)$(ConfigurationName)\$(PlatformName)\$(ProjectName)"
ConfigurationType="2"
UseOfATL="2"
ATLMinimizesCRunTimeLibraryUsage="false"
107
</Configuration>
110
108
111
109
Name="Release|Win32"
112
113
114
115
UseOfATL="1"
116
117
206
209
207
210
208
Name="Release Trace|Win32"
211
212
213
214
215
216
303
Name="VCPostBuildEventTool"
306
304
307
305
308
309
310
Name="Debug|x64"
311
312
313
314
315
316
CharacterSet="1"
317
>
318
<Tool
319
Name="VCPreBuildEventTool"
320
321
322
Name="VCCustomBuildTool"
323
324
325
Name="VCXMLDataGeneratorTool"
326
327
328
Name="VCWebServiceProxyGeneratorTool"
329
330
331
Name="VCMIDLTool"
332
PreprocessorDefinitions="_DEBUG"
333
MkTypLibCompatible="false"
334
TargetEnvironment="3"
335
GenerateStublessProxies="true"
336
TypeLibraryName="$(IntDir)/FilterGraphSpy.tlb"
337
HeaderFileName="FilterGraphSpy_i.h"
338
DLLDataFileName=""
339
InterfaceIdentifierFileName="FilterGraphSpy_i.c"
340
ProxyFileName="FilterGraphSpy_p.c"
341
342
343
Name="VCCLCompilerTool"
344
Optimization="0"
345
PreprocessorDefinitions="WIN32;_WINDOWS;_DEBUG;_USRDLL"
346
MinimalRebuild="true"
347
ExceptionHandling="2"
348
BasicRuntimeChecks="3"
349
RuntimeLibrary="3"
350
UsePrecompiledHeader="2"
351
WarningLevel="3"
352
DebugInformationFormat="3"
353
354
355
Name="VCManagedResourceCompilerTool"
356
357
358
Name="VCResourceCompilerTool"
359
360
Culture="1033"
361
AdditionalIncludeDirectories="$(IntDir)"
362
363
364
Name="VCPreLinkEventTool"
365
366
367
Name="VCLinkerTool"
368
RegisterOutput="true"
369
IgnoreImportLibrary="true"
370
LinkIncremental="2"
371
ModuleDefinitionFile=".\FilterGraphSpy.def"
372
GenerateDebugInformation="true"
373
SubSystem="2"
374
TargetMachine="17"
375
376
377
Name="VCALinkTool"
378
379
380
Name="VCManifestTool"
381
382
383
Name="VCXDCMakeTool"
384
385
386
Name="VCBscMakeTool"
387
388
389
Name="VCFxCopTool"
390
391
392
Name="VCAppVerifierTool"
393
394
395
396
397
398
399
Name="Release|x64"
400
401
402
403
404
405
406
WholeProgramOptimization="1"
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
PreprocessorDefinitions="NDEBUG"
423
424
425
426
427
428
429
430
431
432
433
434
Optimization="3"
435
InlineFunctionExpansion="2"
436
EnableIntrinsicFunctions="true"
437
FavorSizeOrSpeed="2"
438
OmitFramePointers="true"
439
EnableFiberSafeOptimizations="true"
440
WholeProgramOptimization="true"
441
PreprocessorDefinitions="WIN32;_WINDOWS;NDEBUG;_USRDLL"
442
StringPooling="true"
443
444
RuntimeLibrary="0"
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
LinkIncremental="1"
466
467
DelayLoadDLLs="dbghelp.dll"
468
469
470
OptimizeReferences="2"
471
EnableCOMDATFolding="2"
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
Name="Release Trace|x64"
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
PreprocessorDefinitions="WIN32;_WINDOWS;NDEBUG;_USRDLL;_TRACE=1;_TRACELEVEL=4"
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
</Configurations>
594
<References>
595
</References>
596
CompileAsManaged="0"
630
631
</FileConfiguration>
632
633
<FileConfiguration
634
635
636
637
638
UsePrecompiledHeader="0"
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
</File>
660
<File
661
RelativePath=".\FilterGraphSpy.cpp"
662
UsePrecompiledHeader="1"
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
</Filter>
729
<Filter
730
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
RelativePath=".\FilterGraphSpy_i.h"
837
6
7
8
/* File created by MIDL compiler version 7.00.0500 */
9
/* at Mon Jun 22 10:09:59 2009
/* at Mon Nov 02 10:09:50 2009
10
*/
/* Compiler settings for .\FilterGraphSpy.idl:
Oicf, W1, Zp8, env=Win32 (32b run)
MIDL_DEFINE_GUID(IID, LIBID_AlaxInfoFilterGraphSpy,0xB9EC374B,0x834B,0x4DA9,0xBF,0xB5,0xC1,0x87,0x2C,0xE7,0x36,0xFF);
MIDL_DEFINE_GUID(IID, IID_IFilterGraphAddRemoveHook,0xACBECDFD,0xD8CA,0x49c8,0xB7,0x99,0xD2,0x32,0x25,0xD5,0xBF,0xAD);
MIDL_DEFINE_GUID(IID, IID_IFilterGraphConnectHook,0xD0F4C168,0xD09D,0x481e,0x90,0x3D,0x74,0x61,0xCE,0x69,0xE3,0x91);
MIDL_DEFINE_GUID(IID, IID_IFilterGraphStateControlHook,0x65FA1519,0xA935,0x4fa9,0xA1,0x5D,0x94,0x26,0x45,0x7E,0x02,0xF6);
MIDL_DEFINE_GUID(CLSID, CLSID_Spy,0xF552C23D,0xF088,0x41C3,0xA0,0x80,0x84,0x64,0xD7,0xBB,0x9B,0xAD);
4
5
#endif /* __ISpy_FWD_DEFINED__ */
#ifndef __IFilterGraphAddRemoveHook_FWD_DEFINED__
#define __IFilterGraphAddRemoveHook_FWD_DEFINED__
typedef interface IFilterGraphAddRemoveHook IFilterGraphAddRemoveHook;
#endif /* __IFilterGraphAddRemoveHook_FWD_DEFINED__ */
#ifndef __IFilterGraphConnectHook_FWD_DEFINED__
#define __IFilterGraphConnectHook_FWD_DEFINED__
typedef interface IFilterGraphConnectHook IFilterGraphConnectHook;
#endif /* __IFilterGraphConnectHook_FWD_DEFINED__ */
#ifndef __IFilterGraphStateControlHook_FWD_DEFINED__
#define __IFilterGraphStateControlHook_FWD_DEFINED__
typedef interface IFilterGraphStateControlHook IFilterGraphStateControlHook;
#endif /* __IFilterGraphStateControlHook_FWD_DEFINED__ */
#ifndef __Spy_FWD_DEFINED__
#define __Spy_FWD_DEFINED__
#define __ISpy_INTERFACE_DEFINED__
106
/* interface ISpy */
/* [unique][helpstring][nonextensible][dual][uuid][object] */
/* [unique][helpstring][nonextensible][oleautomation][dual][uuid][object] */
EXTERN_C const IID IID_ISpy;
205
223
EXTERN_C const IID LIBID_AlaxInfoFilterGraphSpy;
224
225
226
#ifndef __IFilterGraphAddRemoveHook_INTERFACE_DEFINED__
227
#define __IFilterGraphAddRemoveHook_INTERFACE_DEFINED__
228
229
/* interface IFilterGraphAddRemoveHook */
230
/* [unique][helpstring][nonextensible][uuid][object] */
231
232
233
EXTERN_C const IID IID_IFilterGraphAddRemoveHook;
234
235
#if defined(__cplusplus) && !defined(CINTERFACE)
236
237
MIDL_INTERFACE("ACBECDFD-D8CA-49c8-B799-D23225D5BFAD")
238
IFilterGraphAddRemoveHook : public IUnknown
239
240
public:
241
virtual HRESULT STDMETHODCALLTYPE OnAddFilter(
242
/* [in] */ ISpy *pSpy,
243
/* [in] */ IUnknown *pBaseFilterUnknown,
244
/* [in] */ LPCWSTR pszName,
245
/* [out][in] */ BOOL *pbDefault) = 0;
246
247
virtual HRESULT STDMETHODCALLTYPE OnRemoveFilter(
248
249
250
251
252
virtual HRESULT STDMETHODCALLTYPE OnAddSourceFilter(
253
254
/* [in] */ LPCWSTR pszFileName,
255
/* [in] */ LPCWSTR pszFilterName,
256
/* [out] */ IUnknown **ppBaseFilterUnknown,
257
258
259
virtual HRESULT STDMETHODCALLTYPE OnAddSourceFilterForMoniker(
260
261
/* [in] */ IUnknown *pMonikerUnknown,
262
/* [in] */ IUnknown *pBindCtxUnknown,
263
264
265
266
267
268
269
#else /* C style interface */
270
271
typedef struct IFilterGraphAddRemoveHookVtbl
272
273
BEGIN_INTERFACE
274
275
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
276
IFilterGraphAddRemoveHook * This,
277
/* [in] */ REFIID riid,
278
/* [iid_is][out] */
279
__RPC__deref_out void **ppvObject);
280
281
ULONG ( STDMETHODCALLTYPE *AddRef )(
282
IFilterGraphAddRemoveHook * This);
283
284
ULONG ( STDMETHODCALLTYPE *Release )(
285
286
287
HRESULT ( STDMETHODCALLTYPE *OnAddFilter )(
288
289
290
291
292
/* [out][in] */ BOOL *pbDefault);
293
294
HRESULT ( STDMETHODCALLTYPE *OnRemoveFilter )(
295
296
297
298
299
300
HRESULT ( STDMETHODCALLTYPE *OnAddSourceFilter )(
301
302
HRESULT ( STDMETHODCALLTYPE *OnAddSourceFilterForMoniker )(
END_INTERFACE
} IFilterGraphAddRemoveHookVtbl;
interface IFilterGraphAddRemoveHook
CONST_VTBL struct IFilterGraphAddRemoveHookVtbl *lpVtbl;
#ifdef COBJMACROS
#define IFilterGraphAddRemoveHook_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define IFilterGraphAddRemoveHook_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define IFilterGraphAddRemoveHook_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define IFilterGraphAddRemoveHook_OnAddFilter(This,pSpy,pBaseFilterUnknown,pszName,pbDefault) \
( (This)->lpVtbl -> OnAddFilter(This,pSpy,pBaseFilterUnknown,pszName,pbDefault) )
#define IFilterGraphAddRemoveHook_OnRemoveFilter(This,pSpy,pBaseFilterUnknown,pbDefault) \
( (This)->lpVtbl -> OnRemoveFilter(This,pSpy,pBaseFilterUnknown,pbDefault) )
#define IFilterGraphAddRemoveHook_OnAddSourceFilter(This,pSpy,pszFileName,pszFilterName,ppBaseFilterUnknown,pbDefault) \
( (This)->lpVtbl -> OnAddSourceFilter(This,pSpy,pszFileName,pszFilterName,ppBaseFilterUnknown,pbDefault) )
#define IFilterGraphAddRemoveHook_OnAddSourceFilterForMoniker(This,pSpy,pMonikerUnknown,pBindCtxUnknown,pszFilterName,ppBaseFilterUnknown,pbDefault) \
( (This)->lpVtbl -> OnAddSourceFilterForMoniker(This,pSpy,pMonikerUnknown,pBindCtxUnknown,pszFilterName,ppBaseFilterUnknown,pbDefault) )
#endif /* COBJMACROS */
#endif /* C style interface */
#endif /* __IFilterGraphAddRemoveHook_INTERFACE_DEFINED__ */
#ifndef __IFilterGraphConnectHook_INTERFACE_DEFINED__
#define __IFilterGraphConnectHook_INTERFACE_DEFINED__
/* interface IFilterGraphConnectHook */
EXTERN_C const IID IID_IFilterGraphConnectHook;
MIDL_INTERFACE("D0F4C168-D09D-481e-903D-7461CE69E391")
IFilterGraphConnectHook : public IUnknown
virtual HRESULT STDMETHODCALLTYPE OnConnectDirect(
/* [in] */ IUnknown *pOutputPinUnknown,
/* [in] */ IUnknown *pInputPinUnknown,
/* [in] */ const BYTE *pMediaTypeData,
virtual HRESULT STDMETHODCALLTYPE OnReconnect(
/* [in] */ IUnknown *pPinUnknown,
virtual HRESULT STDMETHODCALLTYPE OnDisconnect(
virtual HRESULT STDMETHODCALLTYPE OnConnect(
virtual HRESULT STDMETHODCALLTYPE OnReconnectEx(
typedef struct IFilterGraphConnectHookVtbl
IFilterGraphConnectHook * This,
IFilterGraphConnectHook * This);
HRESULT ( STDMETHODCALLTYPE *OnConnectDirect )(
HRESULT ( STDMETHODCALLTYPE *OnReconnect )(
HRESULT ( STDMETHODCALLTYPE *OnDisconnect )(
HRESULT ( STDMETHODCALLTYPE *OnConnect )(
HRESULT ( STDMETHODCALLTYPE *OnReconnectEx )(
} IFilterGraphConnectHookVtbl;
interface IFilterGraphConnectHook
CONST_VTBL struct IFilterGraphConnectHookVtbl *lpVtbl;
#define IFilterGraphConnectHook_QueryInterface(This,riid,ppvObject) \
#define IFilterGraphConnectHook_AddRef(This) \
#define IFilterGraphConnectHook_Release(This) \
#define IFilterGraphConnectHook_OnConnectDirect(This,pSpy,pOutputPinUnknown,pInputPinUnknown,pMediaTypeData,pbDefault) \
( (This)->lpVtbl -> OnConnectDirect(This,pSpy,pOutputPinUnknown,pInputPinUnknown,pMediaTypeData,pbDefault) )
#define IFilterGraphConnectHook_OnReconnect(This,pSpy,pPinUnknown,pbDefault) \
( (This)->lpVtbl -> OnReconnect(This,pSpy,pPinUnknown,pbDefault) )
#define IFilterGraphConnectHook_OnDisconnect(This,pSpy,pPinUnknown,pbDefault) \
( (This)->lpVtbl -> OnDisconnect(This,pSpy,pPinUnknown,pbDefault) )
#define IFilterGraphConnectHook_OnConnect(This,pSpy,pOutputPinUnknown,pInputPinUnknown,pbDefault) \
( (This)->lpVtbl -> OnConnect(This,pSpy,pOutputPinUnknown,pInputPinUnknown,pbDefault) )
#define IFilterGraphConnectHook_OnReconnectEx(This,pSpy,pPinUnknown,pMediaTypeData,pbDefault) \
( (This)->lpVtbl -> OnReconnectEx(This,pSpy,pPinUnknown,pMediaTypeData,pbDefault) )
#endif /* __IFilterGraphConnectHook_INTERFACE_DEFINED__ */
#ifndef __IFilterGraphStateControlHook_INTERFACE_DEFINED__
#define __IFilterGraphStateControlHook_INTERFACE_DEFINED__
/* interface IFilterGraphStateControlHook */
EXTERN_C const IID IID_IFilterGraphStateControlHook;
MIDL_INTERFACE("65FA1519-A935-4fa9-A15D-9426457E02F6")
IFilterGraphStateControlHook : public IUnknown
virtual HRESULT STDMETHODCALLTYPE OnRun(
virtual HRESULT STDMETHODCALLTYPE OnPause(
virtual HRESULT STDMETHODCALLTYPE OnStop(
typedef struct IFilterGraphStateControlHookVtbl
IFilterGraphStateControlHook * This,
IFilterGraphStateControlHook * This);
HRESULT ( STDMETHODCALLTYPE *OnRun )(
HRESULT ( STDMETHODCALLTYPE *OnPause )(
HRESULT ( STDMETHODCALLTYPE *OnStop )(
} IFilterGraphStateControlHookVtbl;
interface IFilterGraphStateControlHook
CONST_VTBL struct IFilterGraphStateControlHookVtbl *lpVtbl;
#define IFilterGraphStateControlHook_QueryInterface(This,riid,ppvObject) \
#define IFilterGraphStateControlHook_AddRef(This) \
#define IFilterGraphStateControlHook_Release(This) \
#define IFilterGraphStateControlHook_OnRun(This,pSpy,pbDefault) \
( (This)->lpVtbl -> OnRun(This,pSpy,pbDefault) )
597
598
#define IFilterGraphStateControlHook_OnPause(This,pSpy,pbDefault) \
599
( (This)->lpVtbl -> OnPause(This,pSpy,pbDefault) )
600
601
#define IFilterGraphStateControlHook_OnStop(This,pSpy,pbDefault) \
602
( (This)->lpVtbl -> OnStop(This,pSpy,pbDefault) )
603
604
605
606
607
608
609
610
611
612
#endif /* __IFilterGraphStateControlHook_INTERFACE_DEFINED__ */
613
614
EXTERN_C const CLSID CLSID_Spy;
615
616
#ifdef __cplusplus
617
#include "FilterGraphSpy_i.h"
////////////////////////////////////////////////////////////
// CHookHostT
template <typename T, typename IHook, LPCTSTR* t_ppszHookName>
class CHookHostT
////////////////////////////////////////////////////////
// CHookArray
class CHookArray :
public CRoArrayT<CComPtr<IHook> >
private:
mutable CRoCriticalSection m_HookCriticalSection;
BOOL m_bHookArrayInitialized;
CHookArray m_HookArray;
VOID InitializeHookArray()
_A(m_HookArray.IsEmpty());
CRoListT<CLSID> ClassIdentifierList;
static const HKEY g_phParentKeys[] = { HKEY_LOCAL_MACHINE, HKEY_CURRENT_USER };
static const LPCTSTR g_ppszKeyNameFormats[] = { _T("SOFTWARE\\Classes\\"), _T("Software\\Classes\\") };
for(SIZE_T nKeyIndex = 0; nKeyIndex < DIM(g_phParentKeys); nKeyIndex++)
const CString sKeyName = AtlFormatString(_T("%sCLSID\\%ls\\Hooks\\%s"), g_ppszKeyNameFormats[nKeyIndex], _PersistHelper::StringFromIdentifier(T::GetObjectCLSID()), *t_ppszHookName);
CRegKey Key;
if(FAILED(HRESULT_FROM_WIN32(Key.Open(g_phParentKeys[nKeyIndex], sKeyName, KEY_READ))))
continue;
for(DWORD nIndex = 0; ; nIndex++)
DWORD nNameLength = 0;
RegEnumKeyEx(Key, nIndex, NULL, &nNameLength, NULL, NULL, NULL, NULL);
nNameLength = max(2 * nNameLength, 256);
CTempBuffer<TCHAR, 4096> pszName(nNameLength);
const HRESULT nRegEnumKeyResult = HRESULT_FROM_WIN32(RegEnumKeyEx(Key, nIndex, pszName, &nNameLength, NULL, NULL, NULL, NULL));
if(FAILED(nRegEnumKeyResult))
__D(nRegEnumKeyResult == HRESULT_FROM_WIN32(ERROR_NO_MORE_ITEMS), nRegEnumKeyResult);
break;
}
_ATLTRY
const CLSID ClassIdentifier = _PersistHelper::ClassIdentifierFromString(CT2CW(pszName));
_Z4(atlTraceGeneral, 4, _T("ClassIdentifier %ls\n"), _PersistHelper::StringFromIdentifier(ClassIdentifier));
__D(ClassIdentifier != CLSID_NULL, E_UNNAMED);
if(ClassIdentifierList.Find(ClassIdentifier))
_W(ClassIdentifierList.AddTail(ClassIdentifier));
CComPtr<IHook> pHook;
__C(pHook.CoCreateInstance(ClassIdentifier));
_W(m_HookArray.Add(pHook) >= 0);
_ATLCATCHALL()
_Z_EXCEPTION();
CHookHostT() throw() :
m_bHookArrayInitialized(FALSE)
SIZE_T GetHookArray(CHookArray& HookArray)
_A(HookArray.IsEmpty());
CRoCriticalSectionLock HookLock(m_HookCriticalSection);
if(!m_bHookArrayInitialized)
m_bHookArrayInitialized = TRUE;
InitializeHookArray();
HookArray.Append(m_HookArray);
return HookArray.GetCount();
101
102
103
104
#define HOOK_PROLOG(Base) \
105
_ATLTRY \
{ \
Base::CHookArray HookArray; \
if(Base::GetHookArray(HookArray)) \
T* pT = static_cast<T*>(this); \
for(SIZE_T nIndex = 0; nIndex < HookArray.GetCount(); nIndex++) \
BOOL bDefault = TRUE; \
const HRESULT nResult = HookArray[nIndex]->
#define HOOK_EPILOG() \
if(!bDefault) \
118
return nResult; \
119
_A(SUCCEEDED(nResult)); \
120
} \
121
122
123
_ATLCATCHALL() \
124
125
_Z_EXCEPTION(); \
126
// CSpyT
LPCTSTR g_pszAddRemoveHookName = _T("Add/Remove Hooks");
LPCTSTR g_pszConnectHookName = _T("Connect Hooks");
LPCTSTR g_pszStateControlHookName = _T("State Control Hooks");
134
template <typename T, const CLSID* t_pFilterGraphClassIdentifier>
135
class ATL_NO_VTABLE CSpyT :
136
public CComObjectRootEx<CComMultiThreadModel>,
137
//public CComCoClass<CSpyT, &CLSID_Spy>,
138
public IDispatchImpl<ISpy>,
139
public IFilterGraph2,
140
public IDispatchImpl<IMediaControl, &__uuidof(IMediaControl), &__uuidof(Quartz::__QuartzTypeLib)>
141
public IDispatchImpl<IMediaControl, &__uuidof(IMediaControl), &__uuidof(Quartz::__QuartzTypeLib)>,
142
public CHookHostT<T, IFilterGraphAddRemoveHook, &g_pszAddRemoveHookName>,
143
public CHookHostT<T, IFilterGraphConnectHook, &g_pszConnectHookName>,
144
public CHookHostT<T, IFilterGraphStateControlHook, &g_pszStateControlHookName>
145
typedef CSpyT<T, t_pFilterGraphClassIdentifier> CSpy;
146
147
typedef CHookHostT<T, IFilterGraphAddRemoveHook, &g_pszAddRemoveHookName> CFilterGraphAddRemoveHookHost;
148
typedef CHookHostT<T, IFilterGraphConnectHook, &g_pszConnectHookName> CFilterGraphConnectHookHost;
149
typedef CHookHostT<T, IFilterGraphStateControlHook, &g_pszStateControlHookName> CFilterGraphStateControlHookHost;
150
151
//enum { IDR = IDR_SPY };
152
157
DECLARE_GET_CONTROLLING_UNKNOWN()
158
159
DECLARE_QI_TRACE(CSpy)
160
//DECLARE_QI_TRACE(CSpy)
161
BEGIN_COM_MAP(CSpy)
162
COM_INTERFACE_ENTRY(ISpy)
163
//COM_INTERFACE_ENTRY(IFilterGraph3)
164
COM_INTERFACE_ENTRY_FUNC(__uuidof(IFilterGraph3), 0, QueryFilterGraph3Interface)
COM_INTERFACE_ENTRY(IFilterGraph2)
165
COM_INTERFACE_ENTRY(IGraphBuilder)
166
COM_INTERFACE_ENTRY(IFilterGraph)
167
168
BOOL m_bIsAggregated;
169
CComPtr<IUnknown> m_pInnerUnknown;
170
CComPtr<IFilterGraph2> m_pInnerFilterGraph2;
CComPtr<IFilterGraph3> m_pInnerFilterGraph3;
171
CComPtr<IMediaControl> m_pInnerMediaControl;
172
_FilterGraphHelper::CRotRunningFilterGraph m_RunningFilterGraph;
173
CComPtr<IUnknown> m_pTemporaryUnknown;
m_RunningFilterGraph.SetFilterGraph(NULL);
_Z4(atlTraceRefcount, 4, _T("this 0x%08x, m_dwRef 0x%x\n"), this, m_dwRef);
HRESULT InternalQueryFilterGraph3Interface(REFIID InterfaceIdentifier, VOID** ppvObject) throw()
_A(InterfaceIdentifier == __uuidof(IFilterGraph3));
_A(ppvObject);
if(!m_pInnerFilterGraph3)
*ppvObject = NULL;
return E_NOINTERFACE;
T* pT = static_cast<T*>(this);
*ppvObject = (IFilterGraph3*) pT;
pT->InternalAddRef();
return S_OK;
static HRESULT WINAPI QueryFilterGraph3Interface(VOID* pvThis, REFIID InterfaceIdentifier, VOID** ppvObject, DWORD_PTR) throw()
return ((CSpy*) pvThis)->InternalQueryFilterGraph3Interface(InterfaceIdentifier, ppvObject);
HRESULT HookMediaControlAddSourceFilter(BSTR sFileName, IBaseFilter** ppBaseFilter, BOOL* pbDefault) throw()
_A(pbDefault);
HOOK_PROLOG(CFilterGraphAddRemoveHookHost)
OnAddSourceFilter(pT, sFileName, NULL, reinterpret_cast<IUnknown**>(ppBaseFilter), &bDefault);
*pbDefault = bDefault;
HOOK_EPILOG()
CComQIPtr<IFilterGraph2> pFilterGraph2 = pUnknown;
__D(pFilterGraph2, E_NOINTERFACE);
pFilterGraph2.p->Release();
CComQIPtr<IFilterGraph3> pFilterGraph3 = pUnknown;
if(pFilterGraph3)
pFilterGraph3.p->Release();
CComQIPtr<IMediaControl> pMediaControl = pUnknown;
__D(pMediaControl, E_NOINTERFACE);
pMediaControl.p->Release();
{ const ULONG nAddRefCount = pControllingUnknown.p->AddRef(); const ULONG nReleaseCount = pControllingUnknown.p->Release(); _Z5(atlTraceRefcount, 5, _T("m_dwRef 0x%x, AddRef %d, Release %d\n"), m_dwRef, nAddRefCount, nReleaseCount); }
m_pInnerUnknown = pUnknown;
m_pInnerFilterGraph2 = pFilterGraph2;
m_pInnerFilterGraph3 = pFilterGraph3;
m_pInnerMediaControl = pMediaControl;
if(m_bIsAggregated)
pControllingUnknown.p->AddRef();
m_pInnerMediaControl = NULL;
if(m_pInnerFilterGraph3)
m_pInnerFilterGraph3 = NULL;
if(m_pInnerFilterGraph2)
// ISpy
// IFilterGraph
STDMETHOD(AddFilter)(IBaseFilter* pFilter, LPCWSTR pszName) throw()
STDMETHOD(AddFilter)(IBaseFilter* pBaseFilter, LPCWSTR pszName) throw()
_Z4(atlTraceCOM, 4, _T("pszName \"%s\"\n"), CString(pszName));
_Z4(atlTraceCOM, 4, _T("pBaseFilter 0x%08x, pszName \"%s\"\n"), pBaseFilter, CString(pszName));
ReleaseTemporaryUnknown();
return m_pInnerFilterGraph2->AddFilter(pFilter, pszName);
OnAddFilter(pT, pBaseFilter, pszName, &bDefault);
return m_pInnerFilterGraph2->AddFilter(pBaseFilter, pszName);
STDMETHOD(RemoveFilter)(IBaseFilter* pFilter) throw()
STDMETHOD(RemoveFilter)(IBaseFilter* pBaseFilter) throw()
_Z4(atlTraceCOM, 4, _T("...\n"));
_Z4(atlTraceCOM, 4, _T("pBaseFilter 0x%08x\n"), pBaseFilter);
return m_pInnerFilterGraph2->RemoveFilter(pFilter);
if(pBaseFilter)
const CStringW sName = _FilterGraphHelper::GetFilterName(pBaseFilter);
_Z4(atlTraceGeneral, 4, _T("sName \"%ls\"\n"), sName);
OnRemoveFilter(pT, pBaseFilter, &bDefault);
return m_pInnerFilterGraph2->RemoveFilter(pBaseFilter);
STDMETHOD(EnumFilters)(IEnumFilters** ppEnumFilters) throw()
STDMETHOD(ConnectDirect)(IPin* pOutputPin, IPin* pInputPin, const AM_MEDIA_TYPE* pMediaType) throw()
if(pOutputPin && pInputPin)
_Z4(atlTraceGeneral, 4, _T("pOutputPin \"%ls\", pInputPin \"%ls\"\n"), _FilterGraphHelper::GetPinFullName(pOutputPin), _FilterGraphHelper::GetPinFullName(pInputPin));
if(pMediaType)
_FilterGraphHelper::TraceMediaType(pMediaType);
HOOK_PROLOG(CFilterGraphConnectHookHost)
OnConnectDirect(pT, pOutputPin, pInputPin, (const BYTE*) pMediaType, &bDefault);
return m_pInnerFilterGraph2->ConnectDirect(pOutputPin, pInputPin, pMediaType);
STDMETHOD(Reconnect)(IPin* pPin) throw()
OnReconnect(pT, pPin, &bDefault);
return m_pInnerFilterGraph2->Reconnect(pPin);
STDMETHOD(Disconnect)(IPin* pPin) throw()
618
619
620
621
OnDisconnect(pT, pPin, &bDefault);
622
return m_pInnerFilterGraph2->Disconnect(pPin);
623
624
STDMETHOD(SetDefaultSyncSource)() throw()
625
STDMETHOD(Connect)(IPin* pOutputPin, IPin* pInputPin) throw()
OnConnect(pT, pOutputPin, pInputPin, &bDefault);
return m_pInnerFilterGraph2->Connect(pOutputPin, pInputPin);
STDMETHOD(Render)(IPin* pOutputPin) throw()
_Z4(atlTraceCOM, 4, _T("pszFileName \"%s\", pszPlayListFileName \"%s\"\n"), CString(pszFileName), CString(pszPlayListFileName));
return m_pInnerFilterGraph2->RenderFile(pszFileName, pszPlayListFileName);
STDMETHOD(AddSourceFilter)(LPCWSTR pszFileName, LPCWSTR pszFilterName, IBaseFilter** ppFilter) throw()
STDMETHOD(AddSourceFilter)(LPCWSTR pszFileName, LPCWSTR pszFilterName, IBaseFilter** ppBaseFilter) throw()
_Z4(atlTraceCOM, 4, _T("pszFileName \"%s\", pszFilterName \"%s\"\n"), CString(pszFileName), CString(pszFilterName));
return m_pInnerFilterGraph2->AddSourceFilter(pszFileName, pszFilterName, ppFilter);
663
664
OnAddSourceFilter(pT, pszFileName, pszFilterName, reinterpret_cast<IUnknown**>(ppBaseFilter), &bDefault);
665
666
return m_pInnerFilterGraph2->AddSourceFilter(pszFileName, pszFilterName, ppBaseFilter);
667
STDMETHOD(SetLogFile)(DWORD_PTR hFile) throw()
668
669
670
return m_pInnerFilterGraph2->SetLogFile(hFile);
671
672
STDMETHOD(Abort)() throw()
673
674
675
return m_pInnerFilterGraph2->Abort();
676
677
STDMETHOD(ShouldOperationContinue)() throw()
678
679
680
return m_pInnerFilterGraph2->ShouldOperationContinue();
681
682
683
// IFilterGraph2
684
STDMETHOD(AddSourceFilterForMoniker)(IMoniker* pMoniker, IBindCtx* pBindCtx, LPCWSTR pszFilterName, IBaseFilter** ppFilter) throw()
685
STDMETHOD(AddSourceFilterForMoniker)(IMoniker* pMoniker, IBindCtx* pBindCtx, LPCWSTR pszFilterName, IBaseFilter** ppBaseFilter) throw()
686
_Z4(atlTraceCOM, 4, _T("pszFilterName \"%s\"\n"), CString(pszFilterName));
687
688
return m_pInnerFilterGraph2->AddSourceFilterForMoniker(pMoniker, pBindCtx, pszFilterName, ppFilter);
689
690
OnAddSourceFilterForMoniker(pT, pMoniker, pBindCtx, pszFilterName, reinterpret_cast<IUnknown**>(ppBaseFilter), &bDefault);
691
692
return m_pInnerFilterGraph2->AddSourceFilterForMoniker(pMoniker, pBindCtx, pszFilterName, ppBaseFilter);
693
STDMETHOD(ReconnectEx)(IPin* pPin, const AM_MEDIA_TYPE* pMediaType) throw()
694
695
696
697
698
OnReconnectEx(pT, pPin, (const BYTE*) pMediaType, &bDefault);
699
return m_pInnerFilterGraph2->ReconnectEx(pPin, pMediaType);
700
STDMETHOD(RenderEx)(IPin* pOutputPin, DWORD nFlags, DWORD* pnContext) throw()
_Z4(atlTraceCOM, 4, _T("nFlags 0x%x\n"), nFlags);
return m_pInnerFilterGraph2->RenderEx(pOutputPin, nFlags, pnContext);
//// IFilterGraph3
// IFilterGraph3
// STDMETHOD(SetSyncSourceEx)(IReferenceClock* pFilterGraphClock, IReferenceClock* pFilterClock, IBaseFilter* pFilter) throw()
STDMETHOD(SetSyncSourceEx)(IReferenceClock* pFilterGraphReferenceClock, IReferenceClock* pFilterReferenceClock, IBaseFilter* pBaseFilter) throw()
// {
// _Z4(atlTraceCOM, 4, _T("...\n"));
// return m_pInnerFilterGraph3->SetSyncSourceEx(pFilterGraphClock, pFilterClock, pFilter);
_A(m_pInnerFilterGraph3);
// }
return m_pInnerFilterGraph3->SetSyncSourceEx(pFilterGraphReferenceClock, pFilterReferenceClock, pBaseFilter);
// IMediaControl
STDMETHOD(Run)() throw()
#if TRUE
const HRESULT nResult = m_pInnerMediaControl->Run();
_Z4(atlTraceCOM, 4, _T("nResult 0x%08x\n"), nResult);
_FilterGraphHelper::TraceGraphBuilder(this);
return nResult;
HOOK_PROLOG(CFilterGraphStateControlHookHost)
#else
OnRun(pT, &bDefault);
return m_pInnerMediaControl->Run();
731
const HRESULT nRunResult = m_pInnerMediaControl->Run();
732
_Z4(atlTraceGeneral, 4, _T("nRunResult 0x%08x\n"), nRunResult);
733
return nRunResult;
734
STDMETHOD(Pause)() throw()
735
736
737
738
739
OnPause(pT, &bDefault);
740
return m_pInnerMediaControl->Pause();
741
742
STDMETHOD(Stop)() throw()
743
744
745
746
747
OnStop(pT, &bDefault);
748
return m_pInnerMediaControl->Stop();
749
750
STDMETHOD(GetState)(LONG nTimeout, OAFilterState* pState) throw()
751
752
_Z4(atlTraceCOM, 4, _T("nTimeout %d\n"), nTimeout);
753
return m_pInnerMediaControl->GetState(nTimeout, pState);
754
755
STDMETHOD(RenderFile)(BSTR sFilename) throw()
756
STDMETHOD(RenderFile)(BSTR sFileName) throw()
757
_Z4(atlTraceCOM, 4, _T("sFilename \"%s\"\n"), CString(sFilename));
758
_Z4(atlTraceCOM, 4, _T("sFileName \"%s\"\n"), CString(sFileName));
return m_pInnerMediaControl->RenderFile(sFilename);
759
return m_pInnerMediaControl->RenderFile(sFileName);
760
STDMETHOD(AddSourceFilter)(BSTR sFilename, IDispatch** ppDispatch) throw()
761
STDMETHOD(AddSourceFilter)(BSTR sFileName, IDispatch** ppDispatch) throw()
762
763
return m_pInnerMediaControl->AddSourceFilter(sFilename, ppDispatch);
764
765
766
767
CComPtr<IBaseFilter> pBaseFilter;
768
BOOL bDefault = TRUE;
769
const HRESULT nResult = HookMediaControlAddSourceFilter(sFileName, &pBaseFilter, &bDefault);
770
if(!bDefault)
771
772
__D(ppDispatch, E_POINTER);
773
*ppDispatch = NULL;
774
if(SUCCEEDED(nResult))
775
776
CComQIPtr<IDispatch> pDispatch = pBaseFilter;
777
__D(pDispatch, E_NOINTERFACE);
778
*ppDispatch = pDispatch.Detach();
779
780
781
782
783
_ATLCATCH(Exception)
784
785
_C(Exception);
786
787
return m_pInnerMediaControl->AddSourceFilter(sFileName, ppDispatch);
788
STDMETHOD(get_FilterCollection)(IDispatch** ppDispatch) throw()
789
790
791
792
return m_pInnerMediaControl->get_FilterCollection(ppDispatch);
793
794
STDMETHOD(get_RegFilterCollection)(IDispatch** ppDispatch) throw()
795
796
797
798
return m_pInnerMediaControl->get_RegFilterCollection(ppDispatch);
799
800
STDMETHOD(StopWhenReady)() throw()
801
802
803
return m_pInnerMediaControl->StopWhenReady();
804
// WTL
#define _SECURE_ATL TRUE
#define _WTL_NO_CSTRING
#define _WTL_NO_WTYPES
#define _WTL_NO_UNION_CLASSES
#include "roatlbase.h"
#include "roatlvariants.h"
#include "roatlcollections.h"
#include "roatlcom.h"
#include "roatlpersist.h"
#include "roatlmisc.h"
helpstring("ISpy Interface"),helpstring("ISpy Interface"),{{importlib("stdole2.tlb");importlib("stdole2.tlb");helpstring("IFilterGraphAddRemoveHook Interface"),{helpstring("IFilterGraphConnectHook Interface"),{helpstring("IFilterGraphStateControlHook Interface"),{helpstring("Spy Class")helpstring("Spy Class")FILEVERSION 1, 0, 0, 134FILEVERSION 1, 0, 0, 201VALUE "FileVersion", "1, 0, 0, 134\0"VALUE "FileVersion", "1, 0, 0, 201"Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TakeRegistryKeyOwnership", "TakeRegistryKeyOwnership\TakeRegistryKeyOwnership.vcproj", "{853F01C8-5703-4927-AAC7-0871A0940740}"Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TakeRegistryKeyOwnership", "TakeRegistryKeyOwnership\TakeRegistryKeyOwnership.vcproj", "{853F01C8-5703-4927-AAC7-0871A0940740}"Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BdaHooks", "BdaHooks\BdaHooks.vcproj", "{42B74EE4-45E2-44E8-B3EE-6061DBCDD86D}"{1A5DA4E5-ED09-476A-9A42-538D0DDA3FB9} = {1A5DA4E5-ED09-476A-9A42-538D0DDA3FB9}{1A5DA4E5-ED09-476A-9A42-538D0DDA3FB9}.Debug|Win32.ActiveCfg = Debug|Win32{1A5DA4E5-ED09-476A-9A42-538D0DDA3FB9}.Debug|Win32.ActiveCfg = Debug|Win32{1A5DA4E5-ED09-476A-9A42-538D0DDA3FB9}.Debug|Win32.Build.0 = Debug|Win32{1A5DA4E5-ED09-476A-9A42-538D0DDA3FB9}.Debug|x64.ActiveCfg = Debug|x64{1A5DA4E5-ED09-476A-9A42-538D0DDA3FB9}.Release Trace|Win32.ActiveCfg = Release Trace|Win32{1A5DA4E5-ED09-476A-9A42-538D0DDA3FB9}.Release Trace|Win32.ActiveCfg = Release Trace|Win32{1A5DA4E5-ED09-476A-9A42-538D0DDA3FB9}.Release Trace|Win32.Build.0 = Release Trace|Win32{1A5DA4E5-ED09-476A-9A42-538D0DDA3FB9}.Release Trace|Win32.Build.0 = Release Trace|Win32{1A5DA4E5-ED09-476A-9A42-538D0DDA3FB9}.Release Trace|x64.ActiveCfg = Release Trace|x64{1A5DA4E5-ED09-476A-9A42-538D0DDA3FB9}.Release Trace|x64.Build.0 = Release Trace|x64{1A5DA4E5-ED09-476A-9A42-538D0DDA3FB9}.Release|Win32.ActiveCfg = Release|Win32{1A5DA4E5-ED09-476A-9A42-538D0DDA3FB9}.Release|Win32.ActiveCfg = Release|Win32{1A5DA4E5-ED09-476A-9A42-538D0DDA3FB9}.Release|x64.ActiveCfg = Release|x64{E0A3323D-478E-4046-909A-AD12AD399A68}.Debug|Win32.ActiveCfg = Debug|Win32{E0A3323D-478E-4046-909A-AD12AD399A68}.Debug|Win32.ActiveCfg = Debug|Win32{E0A3323D-478E-4046-909A-AD12AD399A68}.Debug|x64.ActiveCfg = Debug|Win32{E0A3323D-478E-4046-909A-AD12AD399A68}.Release Trace|Win32.ActiveCfg = Release|Win32{E0A3323D-478E-4046-909A-AD12AD399A68}.Release Trace|Win32.ActiveCfg = Release|Win32{E0A3323D-478E-4046-909A-AD12AD399A68}.Release Trace|x64.ActiveCfg = Release|Win32{E0A3323D-478E-4046-909A-AD12AD399A68}.Release|Win32.ActiveCfg = Release|Win32{E0A3323D-478E-4046-909A-AD12AD399A68}.Release|Win32.ActiveCfg = Release|Win32{E0A3323D-478E-4046-909A-AD12AD399A68}.Release|x64.ActiveCfg = Release|Win32{F7ED386C-A3F0-4B7D-ABBD-D0364FB44DAC}.Debug|Win32.ActiveCfg = Debug{F7ED386C-A3F0-4B7D-ABBD-D0364FB44DAC}.Debug|Win32.ActiveCfg = Debug{F7ED386C-A3F0-4B7D-ABBD-D0364FB44DAC}.Debug|x64.ActiveCfg = Debug{F7ED386C-A3F0-4B7D-ABBD-D0364FB44DAC}.Release Trace|Win32.ActiveCfg = Release{F7ED386C-A3F0-4B7D-ABBD-D0364FB44DAC}.Release Trace|Win32.ActiveCfg = Release{F7ED386C-A3F0-4B7D-ABBD-D0364FB44DAC}.Release Trace|Win32.Build.0 = Release{F7ED386C-A3F0-4B7D-ABBD-D0364FB44DAC}.Release Trace|Win32.Build.0 = Release{F7ED386C-A3F0-4B7D-ABBD-D0364FB44DAC}.Release Trace|x64.ActiveCfg = Release{F7ED386C-A3F0-4B7D-ABBD-D0364FB44DAC}.Release Trace|x64.Build.0 = Release{F7ED386C-A3F0-4B7D-ABBD-D0364FB44DAC}.Release|Win32.ActiveCfg = Release{F7ED386C-A3F0-4B7D-ABBD-D0364FB44DAC}.Release|Win32.ActiveCfg = Release{F7ED386C-A3F0-4B7D-ABBD-D0364FB44DAC}.Release|x64.ActiveCfg = Release{27D9723B-C970-4185-A448-0E46EBCA0E7A}.Debug|Win32.ActiveCfg = Debug|Win32{27D9723B-C970-4185-A448-0E46EBCA0E7A}.Debug|Win32.ActiveCfg = Debug|Win32{27D9723B-C970-4185-A448-0E46EBCA0E7A}.Debug|x64.ActiveCfg = Debug|x64{27D9723B-C970-4185-A448-0E46EBCA0E7A}.Release Trace|Win32.ActiveCfg = Release|Win32{27D9723B-C970-4185-A448-0E46EBCA0E7A}.Release Trace|Win32.ActiveCfg = Release|Win32{27D9723B-C970-4185-A448-0E46EBCA0E7A}.Release Trace|Win32.Build.0 = Release|Win32{27D9723B-C970-4185-A448-0E46EBCA0E7A}.Release Trace|Win32.Build.0 = Release|Win32{27D9723B-C970-4185-A448-0E46EBCA0E7A}.Release Trace|x64.ActiveCfg = Release|x64{27D9723B-C970-4185-A448-0E46EBCA0E7A}.Release Trace|x64.Build.0 = Release|x64{27D9723B-C970-4185-A448-0E46EBCA0E7A}.Release|Win32.ActiveCfg = Release|Win32{27D9723B-C970-4185-A448-0E46EBCA0E7A}.Release|Win32.ActiveCfg = Release|Win32{27D9723B-C970-4185-A448-0E46EBCA0E7A}.Release|x64.ActiveCfg = Release|x64{F6797714-CC58-4579-A17E-CCB7EE82CBC7}.Debug|Win32.ActiveCfg = Debug|Win32{F6797714-CC58-4579-A17E-CCB7EE82CBC7}.Debug|Win32.ActiveCfg = Debug|Win32{F6797714-CC58-4579-A17E-CCB7EE82CBC7}.Debug|Win32.Build.0 = Debug|Win32{F6797714-CC58-4579-A17E-CCB7EE82CBC7}.Debug|Win32.Build.0 = Debug|Win32{F6797714-CC58-4579-A17E-CCB7EE82CBC7}.Debug|x64.ActiveCfg = Debug|Win32{F6797714-CC58-4579-A17E-CCB7EE82CBC7}.Debug|x64.Build.0 = Debug|Win32{F6797714-CC58-4579-A17E-CCB7EE82CBC7}.Release Trace|Win32.ActiveCfg = Release|Win32{F6797714-CC58-4579-A17E-CCB7EE82CBC7}.Release Trace|Win32.ActiveCfg = Release|Win32{F6797714-CC58-4579-A17E-CCB7EE82CBC7}.Release Trace|Win32.Build.0 = Release|Win32{F6797714-CC58-4579-A17E-CCB7EE82CBC7}.Release Trace|Win32.Build.0 = Release|Win32{F6797714-CC58-4579-A17E-CCB7EE82CBC7}.Release Trace|x64.ActiveCfg = Release|Win32{F6797714-CC58-4579-A17E-CCB7EE82CBC7}.Release Trace|x64.Build.0 = Release|Win32{F6797714-CC58-4579-A17E-CCB7EE82CBC7}.Release|Win32.ActiveCfg = Release|Win32{F6797714-CC58-4579-A17E-CCB7EE82CBC7}.Release|Win32.ActiveCfg = Release|Win32{F6797714-CC58-4579-A17E-CCB7EE82CBC7}.Release|Win32.Build.0 = Release|Win32{F6797714-CC58-4579-A17E-CCB7EE82CBC7}.Release|Win32.Build.0 = Release|Win32{F6797714-CC58-4579-A17E-CCB7EE82CBC7}.Release|x64.ActiveCfg = Release|Win32{F6797714-CC58-4579-A17E-CCB7EE82CBC7}.Release|x64.Build.0 = Release|Win32{853F01C8-5703-4927-AAC7-0871A0940740}.Debug|Win32.ActiveCfg = Debug|Win32{853F01C8-5703-4927-AAC7-0871A0940740}.Debug|Win32.ActiveCfg = Debug|Win32{853F01C8-5703-4927-AAC7-0871A0940740}.Debug|Win32.Build.0 = Debug|Win32{853F01C8-5703-4927-AAC7-0871A0940740}.Debug|Win32.Build.0 = Debug|Win32{853F01C8-5703-4927-AAC7-0871A0940740}.Debug|x64.ActiveCfg = Debug|Win32{853F01C8-5703-4927-AAC7-0871A0940740}.Debug|x64.Build.0 = Debug|Win32{853F01C8-5703-4927-AAC7-0871A0940740}.Release Trace|Win32.ActiveCfg = Release|Win32{853F01C8-5703-4927-AAC7-0871A0940740}.Release Trace|Win32.ActiveCfg = Release|Win32{853F01C8-5703-4927-AAC7-0871A0940740}.Release Trace|Win32.Build.0 = Release|Win32{853F01C8-5703-4927-AAC7-0871A0940740}.Release Trace|Win32.Build.0 = Release|Win32{853F01C8-5703-4927-AAC7-0871A0940740}.Release Trace|x64.ActiveCfg = Release|Win32{853F01C8-5703-4927-AAC7-0871A0940740}.Release Trace|x64.Build.0 = Release|Win32{853F01C8-5703-4927-AAC7-0871A0940740}.Release|Win32.ActiveCfg = Release|Win32{853F01C8-5703-4927-AAC7-0871A0940740}.Release|Win32.ActiveCfg = Release|Win32{853F01C8-5703-4927-AAC7-0871A0940740}.Release|Win32.Build.0 = Release|Win32{853F01C8-5703-4927-AAC7-0871A0940740}.Release|Win32.Build.0 = Release|Win32{853F01C8-5703-4927-AAC7-0871A0940740}.Release|x64.ActiveCfg = Release|Win32{853F01C8-5703-4927-AAC7-0871A0940740}.Release|x64.Build.0 = Release|Win32{42B74EE4-45E2-44E8-B3EE-6061DBCDD86D}.Debug|Win32.ActiveCfg = Debug|Win32{42B74EE4-45E2-44E8-B3EE-6061DBCDD86D}.Debug|Win32.Build.0 = Debug|Win32{42B74EE4-45E2-44E8-B3EE-6061DBCDD86D}.Debug|x64.ActiveCfg = Debug|x64{42B74EE4-45E2-44E8-B3EE-6061DBCDD86D}.Release Trace|Win32.ActiveCfg = Release|Win32{42B74EE4-45E2-44E8-B3EE-6061DBCDD86D}.Release Trace|Win32.Build.0 = Release|Win32{42B74EE4-45E2-44E8-B3EE-6061DBCDD86D}.Release Trace|x64.ActiveCfg = Release|x64{42B74EE4-45E2-44E8-B3EE-6061DBCDD86D}.Release|Win32.ActiveCfg = Release|Win32{42B74EE4-45E2-44E8-B3EE-6061DBCDD86D}.Release|Win32.Build.0 = Release|Win32{42B74EE4-45E2-44E8-B3EE-6061DBCDD86D}.Release|x64.ActiveCfg = Release|x64OutputDirectory="$(ConfigurationName)"OutputDirectory="$(SolutionDir)$(ConfigurationName)\$(PlatformName)"IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"IntermediateDirectory="$(SolutionDir)$(ConfigurationName)\$(PlatformName)\$(ProjectName)"OutputDirectory="$(ConfigurationName)"OutputDirectory="$(SolutionDir)$(ConfigurationName)\$(PlatformName)"IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"IntermediateDirectory="$(SolutionDir)$(ConfigurationName)\$(PlatformName)\$(ProjectName)"OutputDirectory="$(ConfigurationName)"OutputDirectory="$(SolutionDir)$(ConfigurationName)\$(PlatformName)"IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"IntermediateDirectory="$(SolutionDir)$(ConfigurationName)\$(PlatformName)\$(ProjectName)"/* at Mon Jun 22 10:09:59 2009/* at Mon Nov 02 10:09:50 2009/* at Mon Jun 22 10:09:59 2009/* at Mon Nov 02 10:09:50 2009/* [unique][helpstring][nonextensible][oleautomation][dual][uuid][object] */MIDL_INTERFACE("ACBECDFD-D8CA-49c8-B799-D23225D5BFAD"){{{MIDL_INTERFACE("D0F4C168-D09D-481e-903D-7461CE69E391"){{{MIDL_INTERFACE("65FA1519-A935-4fa9-A15D-9426457E02F6"){{{/* at Mon Jun 22 10:09:59 2009/* at Mon Nov 02 10:09:50 2009{{{static const HKEY g_phParentKeys[] = { HKEY_LOCAL_MACHINE, HKEY_CURRENT_USER };static const LPCTSTR g_ppszKeyNameFormats[] = { _T("SOFTWARE\\Classes\\"), _T("Software\\Classes\\") };{const CString sKeyName = AtlFormatString(_T("%sCLSID\\%ls\\Hooks\\%s"), g_ppszKeyNameFormats[nKeyIndex], _PersistHelper::StringFromIdentifier(T::GetObjectCLSID()), *t_ppszHookName);{{{_Z4(atlTraceGeneral, 4, _T("ClassIdentifier %ls\n"), _PersistHelper::StringFromIdentifier(ClassIdentifier));{{{{{{ \{ \{ \{ \LPCTSTR g_pszAddRemoveHookName = _T("Add/Remove Hooks");LPCTSTR g_pszConnectHookName = _T("Connect Hooks");LPCTSTR g_pszStateControlHookName = _T("State Control Hooks");public IDispatchImpl<IMediaControl, &__uuidof(IMediaControl), &__uuidof(Quartz::__QuartzTypeLib)>,public CHookHostT<T, IFilterGraphAddRemoveHook, &g_pszAddRemoveHookName>,public CHookHostT<T, IFilterGraphConnectHook, &g_pszConnectHookName>,public CHookHostT<T, IFilterGraphStateControlHook, &g_pszStateControlHookName>{{//enum { IDR = IDR_SPY };//enum { IDR = IDR_SPY };//DECLARE_QI_TRACE(CSpy)//COM_INTERFACE_ENTRY(IFilterGraph3)COM_INTERFACE_ENTRY_FUNC(__uuidof(IFilterGraph3), 0, QueryFilterGraph3Interface)_Z4(atlTraceRefcount, 4, _T("this 0x%08x, m_dwRef 0x%x\n"), this, m_dwRef);_Z4(atlTraceRefcount, 4, _T("this 0x%08x, m_dwRef 0x%x\n"), this, m_dwRef);{{{{{ const ULONG nAddRefCount = pControllingUnknown.p->AddRef(); const ULONG nReleaseCount = pControllingUnknown.p->Release(); _Z5(atlTraceRefcount, 5, _T("m_dwRef 0x%x, AddRef %d, Release %d\n"), m_dwRef, nAddRefCount, nReleaseCount); }{ const ULONG nAddRefCount = pControllingUnknown.p->AddRef(); const ULONG nReleaseCount = pControllingUnknown.p->Release(); _Z5(atlTraceRefcount, 5, _T("m_dwRef 0x%x, AddRef %d, Release %d\n"), m_dwRef, nAddRefCount, nReleaseCount); }{{{STDMETHOD(AddFilter)(IBaseFilter* pFilter, LPCWSTR pszName) throw()STDMETHOD(AddFilter)(IBaseFilter* pBaseFilter, LPCWSTR pszName) throw(){{_Z4(atlTraceCOM, 4, _T("pszName \"%s\"\n"), CString(pszName));_Z4(atlTraceCOM, 4, _T("pBaseFilter 0x%08x, pszName \"%s\"\n"), pBaseFilter, CString(pszName));return m_pInnerFilterGraph2->AddFilter(pFilter, pszName);HOOK_PROLOG(CFilterGraphAddRemoveHookHost)OnAddFilter(pT, pBaseFilter, pszName, &bDefault);HOOK_EPILOG()return m_pInnerFilterGraph2->AddFilter(pBaseFilter, pszName);STDMETHOD(RemoveFilter)(IBaseFilter* pBaseFilter) throw(){{_Z4(atlTraceCOM, 4, _T("...\n"));_Z4(atlTraceCOM, 4, _T("pBaseFilter 0x%08x\n"), pBaseFilter);return m_pInnerFilterGraph2->RemoveFilter(pFilter);if(pBaseFilter)_ATLTRY{const CStringW sName = _FilterGraphHelper::GetFilterName(pBaseFilter);_Z4(atlTraceGeneral, 4, _T("sName \"%ls\"\n"), sName);}_ATLCATCHALL(){_Z_EXCEPTION();}HOOK_PROLOG(CFilterGraphAddRemoveHookHost)OnRemoveFilter(pT, pBaseFilter, &bDefault);HOOK_EPILOG()return m_pInnerFilterGraph2->RemoveFilter(pBaseFilter);{{{{_Z4(atlTraceCOM, 4, _T("...\n"));_Z4(atlTraceCOM, 4, _T("...\n"));{_Z4(atlTraceGeneral, 4, _T("pOutputPin \"%ls\", pInputPin \"%ls\"\n"), _FilterGraphHelper::GetPinFullName(pOutputPin), _FilterGraphHelper::GetPinFullName(pInputPin));{{{_Z4(atlTraceCOM, 4, _T("...\n"));_Z4(atlTraceCOM, 4, _T("...\n"));{{_Z4(atlTraceCOM, 4, _T("...\n"));_Z4(atlTraceCOM, 4, _T("...\n"));{{_Z4(atlTraceCOM, 4, _T("...\n"));_Z4(atlTraceCOM, 4, _T("...\n"));{_Z4(atlTraceGeneral, 4, _T("pOutputPin \"%ls\", pInputPin \"%ls\"\n"), _FilterGraphHelper::GetPinFullName(pOutputPin), _FilterGraphHelper::GetPinFullName(pInputPin));{_Z4(atlTraceCOM, 4, _T("pszFileName \"%s\", pszPlayListFileName \"%s\"\n"), CString(pszFileName), CString(pszPlayListFileName));_Z4(atlTraceCOM, 4, _T("pszFileName \"%s\", pszPlayListFileName \"%s\"\n"), CString(pszFileName), CString(pszPlayListFileName));STDMETHOD(AddSourceFilter)(LPCWSTR pszFileName, LPCWSTR pszFilterName, IBaseFilter** ppBaseFilter) throw(){{_Z4(atlTraceCOM, 4, _T("pszFileName \"%s\", pszFilterName \"%s\"\n"), CString(pszFileName), CString(pszFilterName));_Z4(atlTraceCOM, 4, _T("pszFileName \"%s\", pszFilterName \"%s\"\n"), CString(pszFileName), CString(pszFilterName));return m_pInnerFilterGraph2->AddSourceFilter(pszFileName, pszFilterName, ppFilter);HOOK_PROLOG(CFilterGraphAddRemoveHookHost)OnAddSourceFilter(pT, pszFileName, pszFilterName, reinterpret_cast<IUnknown**>(ppBaseFilter), &bDefault);HOOK_EPILOG()return m_pInnerFilterGraph2->AddSourceFilter(pszFileName, pszFilterName, ppBaseFilter);STDMETHOD(SetLogFile)(DWORD_PTR hFile) throw()STDMETHOD(SetLogFile)(DWORD_PTR hFile) throw(){{_Z4(atlTraceCOM, 4, _T("...\n"));_Z4(atlTraceCOM, 4, _T("...\n"));STDMETHOD(Abort)() throw()STDMETHOD(Abort)() throw(){{_Z4(atlTraceCOM, 4, _T("...\n"));_Z4(atlTraceCOM, 4, _T("...\n"));STDMETHOD(ShouldOperationContinue)() throw()STDMETHOD(ShouldOperationContinue)() throw(){{_Z4(atlTraceCOM, 4, _T("...\n"));_Z4(atlTraceCOM, 4, _T("...\n"));STDMETHOD(AddSourceFilterForMoniker)(IMoniker* pMoniker, IBindCtx* pBindCtx, LPCWSTR pszFilterName, IBaseFilter** ppFilter) throw()STDMETHOD(AddSourceFilterForMoniker)(IMoniker* pMoniker, IBindCtx* pBindCtx, LPCWSTR pszFilterName, IBaseFilter** ppBaseFilter) throw(){{_Z4(atlTraceCOM, 4, _T("pszFilterName \"%s\"\n"), CString(pszFilterName));_Z4(atlTraceCOM, 4, _T("pszFilterName \"%s\"\n"), CString(pszFilterName));return m_pInnerFilterGraph2->AddSourceFilterForMoniker(pMoniker, pBindCtx, pszFilterName, ppFilter);HOOK_PROLOG(CFilterGraphAddRemoveHookHost)OnAddSourceFilterForMoniker(pT, pMoniker, pBindCtx, pszFilterName, reinterpret_cast<IUnknown**>(ppBaseFilter), &bDefault);HOOK_EPILOG()return m_pInnerFilterGraph2->AddSourceFilterForMoniker(pMoniker, pBindCtx, pszFilterName, ppBaseFilter);STDMETHOD(ReconnectEx)(IPin* pPin, const AM_MEDIA_TYPE* pMediaType) throw()STDMETHOD(ReconnectEx)(IPin* pPin, const AM_MEDIA_TYPE* pMediaType) throw(){{_Z4(atlTraceCOM, 4, _T("...\n"));_Z4(atlTraceCOM, 4, _T("...\n"));STDMETHOD(RenderEx)(IPin* pOutputPin, DWORD nFlags, DWORD* pnContext) throw()STDMETHOD(RenderEx)(IPin* pOutputPin, DWORD nFlags, DWORD* pnContext) throw(){{_Z4(atlTraceCOM, 4, _T("nFlags 0x%x\n"), nFlags);_Z4(atlTraceCOM, 4, _T("nFlags 0x%x\n"), nFlags);//// IFilterGraph3// STDMETHOD(SetSyncSourceEx)(IReferenceClock* pFilterGraphClock, IReferenceClock* pFilterClock, IBaseFilter* pFilter) throw()STDMETHOD(SetSyncSourceEx)(IReferenceClock* pFilterGraphReferenceClock, IReferenceClock* pFilterReferenceClock, IBaseFilter* pBaseFilter) throw()// {{// _Z4(atlTraceCOM, 4, _T("...\n"));_Z4(atlTraceCOM, 4, _T("...\n"));// return m_pInnerFilterGraph3->SetSyncSourceEx(pFilterGraphClock, pFilterClock, pFilter);_A(m_pInnerFilterGraph3);// }return m_pInnerFilterGraph3->SetSyncSourceEx(pFilterGraphReferenceClock, pFilterReferenceClock, pBaseFilter);}STDMETHOD(Run)() throw()STDMETHOD(Run)() throw(){{_Z4(atlTraceCOM, 4, _T("...\n"));_Z4(atlTraceCOM, 4, _T("...\n"));#if TRUEconst HRESULT nResult = m_pInnerMediaControl->Run();{{_Z4(atlTraceCOM, 4, _T("nResult 0x%08x\n"), nResult);{{return nResult;HOOK_PROLOG(CFilterGraphStateControlHookHost)#elseOnRun(pT, &bDefault);return m_pInnerMediaControl->Run();HOOK_EPILOG()#endifconst HRESULT nRunResult = m_pInnerMediaControl->Run();_Z4(atlTraceGeneral, 4, _T("nRunResult 0x%08x\n"), nRunResult);return nRunResult;STDMETHOD(Pause)() throw()STDMETHOD(Pause)() throw(){{_Z4(atlTraceCOM, 4, _T("...\n"));_Z4(atlTraceCOM, 4, _T("...\n"));STDMETHOD(Stop)() throw()STDMETHOD(Stop)() throw(){{_Z4(atlTraceCOM, 4, _T("...\n"));_Z4(atlTraceCOM, 4, _T("...\n"));STDMETHOD(GetState)(LONG nTimeout, OAFilterState* pState) throw()STDMETHOD(GetState)(LONG nTimeout, OAFilterState* pState) throw(){{_Z4(atlTraceCOM, 4, _T("nTimeout %d\n"), nTimeout);_Z4(atlTraceCOM, 4, _T("nTimeout %d\n"), nTimeout);STDMETHOD(RenderFile)(BSTR sFilename) throw()STDMETHOD(RenderFile)(BSTR sFileName) throw(){{_Z4(atlTraceCOM, 4, _T("sFilename \"%s\"\n"), CString(sFilename));_Z4(atlTraceCOM, 4, _T("sFileName \"%s\"\n"), CString(sFileName));return m_pInnerMediaControl->RenderFile(sFilename);return m_pInnerMediaControl->RenderFile(sFileName);STDMETHOD(AddSourceFilter)(BSTR sFilename, IDispatch** ppDispatch) throw()STDMETHOD(AddSourceFilter)(BSTR sFileName, IDispatch** ppDispatch) throw(){{_Z4(atlTraceCOM, 4, _T("sFilename \"%s\"\n"), CString(sFilename));_Z4(atlTraceCOM, 4, _T("sFileName \"%s\"\n"), CString(sFileName));return m_pInnerMediaControl->AddSourceFilter(sFilename, ppDispatch);ReleaseTemporaryUnknown();_ATLTRY{CComPtr<IBaseFilter> pBaseFilter;BOOL bDefault = TRUE;const HRESULT nResult = HookMediaControlAddSourceFilter(sFileName, &pBaseFilter, &bDefault);if(!bDefault){__D(ppDispatch, E_POINTER);*ppDispatch = NULL;if(SUCCEEDED(nResult)){CComQIPtr<IDispatch> pDispatch = pBaseFilter;__D(pDispatch, E_NOINTERFACE);*ppDispatch = pDispatch.Detach();}return nResult;}}_ATLCATCH(Exception){_C(Exception);}return m_pInnerMediaControl->AddSourceFilter(sFileName, ppDispatch);STDMETHOD(get_FilterCollection)(IDispatch** ppDispatch) throw()STDMETHOD(get_FilterCollection)(IDispatch** ppDispatch) throw(){{_Z4(atlTraceCOM, 4, _T("...\n"));_Z4(atlTraceCOM, 4, _T("...\n"));STDMETHOD(get_RegFilterCollection)(IDispatch** ppDispatch) throw()STDMETHOD(get_RegFilterCollection)(IDispatch** ppDispatch) throw(){{_Z4(atlTraceCOM, 4, _T("...\n"));_Z4(atlTraceCOM, 4, _T("...\n"));STDMETHOD(StopWhenReady)() throw()STDMETHOD(StopWhenReady)() throw(){{_Z4(atlTraceCOM, 4, _T("...\n"));_Z4(atlTraceCOM, 4, _T("...\n"));