1 | //////////////////////////////////////////////////////////// |
---|
2 | // Copyright (C) Roman Ryltsov, 2008-2014 |
---|
3 | // Created by Roman Ryltsov roman@alax.info |
---|
4 | // |
---|
5 | // This source code is published to complement DirectShowSpy developer powertoy |
---|
6 | // and demonstrate the internal use of APIs and tricks powering the tool. It is |
---|
7 | // allowed to freely re-use the portions of the code in other projects, commercial or otherwise |
---|
8 | // (provided that you dont pretend that you wrote the original tool). |
---|
9 | // |
---|
10 | // Please keep in mind that DirectShowSpy is a developer tool, it is strongly recommended |
---|
11 | // that it is not shipped with release grade software. The advise applies to hooking methods |
---|
12 | // used by DirectShowSpy in general as well. |
---|
13 | |
---|
14 | import "oaidl.idl"; |
---|
15 | import "ocidl.idl"; |
---|
16 | |
---|
17 | [ |
---|
18 | object, |
---|
19 | uuid(6945711B-FE0F-4C54-965F-5B67969C28B7), |
---|
20 | dual, |
---|
21 | oleautomation, |
---|
22 | nonextensible, |
---|
23 | helpstring("ISpy Interface"), |
---|
24 | pointer_default(unique) |
---|
25 | ] |
---|
26 | interface ISpy : IDispatch |
---|
27 | { |
---|
28 | [id(1), propget] HRESULT MonikerDisplayName([out, retval] BSTR* psMonikerDisplayName); |
---|
29 | [id(2), propget] HRESULT CreationTime([out, retval] DATE* pfTime); |
---|
30 | [id(3), propget] HRESULT FriendlyName([out, retval] BSTR* psFriendlyName); |
---|
31 | [id(3), propput] HRESULT FriendlyName([in] BSTR sFriendlyName); |
---|
32 | [id(4)] HRESULT DoPropertyFrameModal([in] LONG nParentWindowHandle); |
---|
33 | [id(5)] HRESULT DoFilterGraphListModal([in] LONG nParentWindowHandle); |
---|
34 | [id(6)] HRESULT OpenGraphStudioNext([in] LONG nParentWindowHandle, [out, retval] VARIANT_BOOL* pbResult); |
---|
35 | [id(7)] HRESULT OpenGraphEdit([in] LONG nParentWindowHandle, [out, retval] VARIANT_BOOL* pbResult); |
---|
36 | [id(8)] HRESULT ReadRunPropertyBag([in] IUnknown* pBaseFilterUnknown, [in] VARIANT_BOOL bAllowExtension, [out, retval] VARIANT* pvValue); |
---|
37 | }; |
---|
38 | [ |
---|
39 | object, |
---|
40 | uuid(34B280D7-A144-4a64-BCB9-3616896F6877), |
---|
41 | dual, |
---|
42 | oleautomation, |
---|
43 | nonextensible, |
---|
44 | helpstring("IFilterMapperSpy Interface"), |
---|
45 | pointer_default(unique) |
---|
46 | ] |
---|
47 | interface IFilterMapperSpy : IDispatch |
---|
48 | { |
---|
49 | }; |
---|
50 | [ |
---|
51 | object, |
---|
52 | uuid(14EB119F-25CE-4654-ABE1-E6742AF03F2D), |
---|
53 | dual, |
---|
54 | oleautomation, |
---|
55 | nonextensible, |
---|
56 | helpstring("ISystemDeviceEnumeratorSpy Interface"), |
---|
57 | pointer_default(unique) |
---|
58 | ] |
---|
59 | interface ISystemDeviceEnumeratorSpy : IDispatch |
---|
60 | { |
---|
61 | }; |
---|
62 | [ |
---|
63 | object, |
---|
64 | uuid(3D1AF248-DEF1-4E26-A071-FEDF15FED6A8), |
---|
65 | dual, |
---|
66 | oleautomation, |
---|
67 | nonextensible, |
---|
68 | helpstring("IFilterGraphHelper Interface"), |
---|
69 | pointer_default(unique) |
---|
70 | ] |
---|
71 | interface IFilterGraphHelper : IDispatch |
---|
72 | { |
---|
73 | [id(DISPID_VALUE), propget] HRESULT FilterGraph([out, retval] IUnknown** ppFilterGraphUnknown); |
---|
74 | [id(DISPID_VALUE), propput] HRESULT FilterGraph([in] IUnknown* pFilterGraphUnknown); |
---|
75 | [id(1), propget] HRESULT Text([out, retval] BSTR* psText); |
---|
76 | [id(2)] HRESULT DoPropertyFrameModal([in] LONG nParentWindowHandle); |
---|
77 | [id(3)] HRESULT DoFilterGraphListModal([in] LONG nParentWindowHandle); |
---|
78 | [id(4)] HRESULT OpenGraphStudioNext([in] LONG nParentWindowHandle, [in] BSTR sMonikerDisplayName, [out, retval] VARIANT_BOOL* pbResult); |
---|
79 | [id(5)] HRESULT OpenGraphEdit([in] LONG nParentWindowHandle, [in] BSTR sMonikerDisplayName, [out, retval] VARIANT_BOOL* pbResult); |
---|
80 | }; |
---|
81 | [ |
---|
82 | uuid(B9EC374B-834B-4DA9-BFB5-C1872CE736FF), |
---|
83 | version(1.0), |
---|
84 | helpstring("Alax.Info Filter Graph Spy 1.0 Type Library") |
---|
85 | ] |
---|
86 | library AlaxInfoDirectShowSpy |
---|
87 | { |
---|
88 | importlib("stdole2.tlb"); |
---|
89 | [ |
---|
90 | object, |
---|
91 | uuid(ACBECDFD-D8CA-49c8-B799-D23225D5BFAD), |
---|
92 | nonextensible, |
---|
93 | helpstring("IFilterGraphAddRemoveHook Interface"), |
---|
94 | pointer_default(unique) |
---|
95 | ] |
---|
96 | interface IFilterGraphAddRemoveHook : IUnknown |
---|
97 | { |
---|
98 | HRESULT OnAddFilter([in] ISpy* pSpy, [in] IUnknown* pBaseFilterUnknown, [in] LPCWSTR pszName, [in, out] BOOL* pbDefault); |
---|
99 | HRESULT OnRemoveFilter([in] ISpy* pSpy, [in] IUnknown* pBaseFilterUnknown, [in, out] BOOL* pbDefault); |
---|
100 | HRESULT OnAddSourceFilter([in] ISpy* pSpy, [in] LPCWSTR pszFileName, [in] LPCWSTR pszFilterName, [out] IUnknown** ppBaseFilterUnknown, [in, out] BOOL* pbDefault); |
---|
101 | HRESULT OnAddSourceFilterForMoniker([in] ISpy* pSpy, [in] IUnknown* pMonikerUnknown, [in] IUnknown* pBindCtxUnknown, [in] LPCWSTR pszFilterName, [out] IUnknown** ppBaseFilterUnknown, [in, out] BOOL* pbDefault); |
---|
102 | }; |
---|
103 | [ |
---|
104 | object, |
---|
105 | uuid(D0F4C168-D09D-481e-903D-7461CE69E391), |
---|
106 | nonextensible, |
---|
107 | helpstring("IFilterGraphConnectHook Interface"), |
---|
108 | pointer_default(unique) |
---|
109 | ] |
---|
110 | interface IFilterGraphConnectHook : IUnknown |
---|
111 | { |
---|
112 | HRESULT OnConnectDirect([in] ISpy* pSpy, [in] IUnknown* pOutputPinUnknown, [in] IUnknown* pInputPinUnknown, [in] const BYTE* pMediaTypeData, [in, out] BOOL* pbDefault); |
---|
113 | HRESULT OnReconnect([in] ISpy* pSpy, [in] IUnknown* pPinUnknown, [in, out] BOOL* pbDefault); |
---|
114 | HRESULT OnDisconnect([in] ISpy* pSpy, [in] IUnknown* pPinUnknown, [in, out] BOOL* pbDefault); |
---|
115 | HRESULT OnConnect([in] ISpy* pSpy, [in] IUnknown* pOutputPinUnknown, [in] IUnknown* pInputPinUnknown, [in, out] BOOL* pbDefault); |
---|
116 | HRESULT OnReconnectEx([in] ISpy* pSpy, [in] IUnknown* pPinUnknown, [in] const BYTE* pMediaTypeData, [in, out] BOOL* pbDefault); |
---|
117 | }; |
---|
118 | [ |
---|
119 | object, |
---|
120 | uuid(65FA1519-A935-4fa9-A15D-9426457E02F6), |
---|
121 | nonextensible, |
---|
122 | helpstring("IFilterGraphStateControlHook Interface"), |
---|
123 | pointer_default(unique) |
---|
124 | ] |
---|
125 | interface IFilterGraphStateControlHook : IUnknown |
---|
126 | { |
---|
127 | HRESULT OnRun([in] ISpy* pSpy, [in, out] BOOL* pbDefault); |
---|
128 | HRESULT OnPause([in] ISpy* pSpy, [in, out] BOOL* pbDefault); |
---|
129 | HRESULT OnStop([in] ISpy* pSpy, [in, out] BOOL* pbDefault); |
---|
130 | }; |
---|
131 | [ |
---|
132 | uuid(F552C23D-F088-41C3-A080-8464D7BB9BAD), |
---|
133 | helpstring("Spy Class") |
---|
134 | ] |
---|
135 | coclass Spy |
---|
136 | { |
---|
137 | [default] interface ISpy; |
---|
138 | }; |
---|
139 | [ |
---|
140 | uuid(2C281C40-8853-4a30-99D3-9DCFF2C015C9), |
---|
141 | helpstring("NoThreadSpy Class") |
---|
142 | ] |
---|
143 | coclass NoThreadSpy |
---|
144 | { |
---|
145 | [default] interface ISpy; |
---|
146 | }; |
---|
147 | [ |
---|
148 | uuid(B6274D9B-1AD3-4c32-83C5-35DC33CAFF47), |
---|
149 | helpstring("FilterMapperSpy Class") |
---|
150 | ] |
---|
151 | coclass FilterMapperSpy |
---|
152 | { |
---|
153 | [default] interface IFilterMapperSpy; |
---|
154 | }; |
---|
155 | [ |
---|
156 | uuid(AD42E3BD-7B9B-4783-9DA2-61A9ACD0D4D2), |
---|
157 | helpstring("SystemDeviceEnumeratorSpy Class") |
---|
158 | ] |
---|
159 | coclass SystemDeviceEnumeratorSpy |
---|
160 | { |
---|
161 | [default] interface ISystemDeviceEnumeratorSpy; |
---|
162 | }; |
---|
163 | [ |
---|
164 | uuid(5A9A684C-A891-4032-8D31-FF6EAB5A0C1E), |
---|
165 | helpstring("FilterGraphHelper Class") |
---|
166 | ] |
---|
167 | coclass FilterGraphHelper |
---|
168 | { |
---|
169 | [default] interface IFilterGraphHelper; |
---|
170 | }; |
---|
171 | [ |
---|
172 | object, |
---|
173 | uuid(E267813C-8F29-4D69-A776-CD462494FCE4), |
---|
174 | nonextensible, |
---|
175 | helpstring("IRunPropertyBagAware Interface"), |
---|
176 | pointer_default(unique) |
---|
177 | ] |
---|
178 | interface IRunPropertyBagAware : IDispatch |
---|
179 | { |
---|
180 | [propget, id(DISPID_VALUE)] HRESULT Value([out, retval] IUnknown** ppPropertyBagUnknown); |
---|
181 | }; |
---|
182 | [ |
---|
183 | uuid(76127943-D22E-4C4E-9D9B-173C224D0EE4), |
---|
184 | helpstring("RunPropertyBagPropertyPage Class") |
---|
185 | ] |
---|
186 | coclass RunPropertyBagPropertyPage |
---|
187 | { |
---|
188 | [default] interface IUnknown; //IPropertyPage; |
---|
189 | }; |
---|
190 | }; |
---|