1 | //////////////////////////////////////////////////////////// |
---|
2 | // Copyright (C) Roman Ryltsov, 2008-2014 |
---|
3 | // Created by Roman Ryltsov roman@alax.info, http://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 |
---|
8 | // or otherwise (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. It is allowed to distribute |
---|
12 | // DirectShowSpy if only it is not registered with Windows by default and either |
---|
13 | // used privately, or registered on specific throubleshooting request. The advice applies |
---|
14 | // to hooking methods used by DirectShowSpy in general as well. |
---|
15 | |
---|
16 | import "oaidl.idl"; |
---|
17 | import "ocidl.idl"; |
---|
18 | |
---|
19 | [ |
---|
20 | object, |
---|
21 | uuid(968E0597-E713-4EF5-A6F3-780B816204C2), |
---|
22 | dual, |
---|
23 | oleautomation, |
---|
24 | nonextensible, |
---|
25 | helpstring("IModuleVersionInformation Interface"), |
---|
26 | pointer_default(unique) |
---|
27 | ] |
---|
28 | interface IModuleVersionInformation : IDispatch |
---|
29 | { |
---|
30 | [id(1), propget] HRESULT Path([out, retval] BSTR* psPath); |
---|
31 | [id(2), propget] HRESULT FileVersion([out, retval] LONGLONG* pnFileVersion); |
---|
32 | [id(3), propget] HRESULT FileVersionString([out, retval] BSTR* psFileVersionString); |
---|
33 | }; |
---|
34 | [ |
---|
35 | object, |
---|
36 | uuid(6945711B-FE0F-4C54-965F-5B67969C28B7), |
---|
37 | dual, |
---|
38 | oleautomation, |
---|
39 | nonextensible, |
---|
40 | helpstring("ISpy Interface"), |
---|
41 | pointer_default(unique) |
---|
42 | ] |
---|
43 | interface ISpy : IDispatch |
---|
44 | { |
---|
45 | [id(1), propget] HRESULT MonikerDisplayName([out, retval] BSTR* psMonikerDisplayName); |
---|
46 | [id(2), propget] HRESULT CreationTime([out, retval] DATE* pfTime); |
---|
47 | [id(3), propget] HRESULT FriendlyName([out, retval] BSTR* psFriendlyName); |
---|
48 | [id(3), propput] HRESULT FriendlyName([in] BSTR sFriendlyName); |
---|
49 | [id(4)] HRESULT DoPropertyFrameModal([in] LONG nParentWindowHandle); |
---|
50 | [id(5)] HRESULT DoFilterGraphListModal([in] LONG nParentWindowHandle); |
---|
51 | [id(6)] HRESULT OpenGraphStudioNext([in] LONG nParentWindowHandle, [out, retval] VARIANT_BOOL* pbResult); |
---|
52 | [id(7)] HRESULT OpenGraphEdit([in] LONG nParentWindowHandle, [out, retval] VARIANT_BOOL* pbResult); |
---|
53 | [id(8)] HRESULT ReadRunPropertyBag([in] IUnknown* pBaseFilterUnknown, [in] VARIANT_BOOL bAllowExtension, [out, retval] VARIANT* pvValue); |
---|
54 | }; |
---|
55 | [ |
---|
56 | object, |
---|
57 | uuid(A7490000-3A5D-455D-9B81-2025B74CD4CD), |
---|
58 | nonextensible, |
---|
59 | helpstring("ISpyEx Interface"), |
---|
60 | pointer_default(unique) |
---|
61 | ] |
---|
62 | interface ISpyEx : IUnknown |
---|
63 | { |
---|
64 | }; |
---|
65 | [ |
---|
66 | object, |
---|
67 | uuid(34B280D7-A144-4a64-BCB9-3616896F6877), |
---|
68 | dual, |
---|
69 | oleautomation, |
---|
70 | nonextensible, |
---|
71 | helpstring("IFilterMapperSpy Interface"), |
---|
72 | pointer_default(unique) |
---|
73 | ] |
---|
74 | interface IFilterMapperSpy : IDispatch |
---|
75 | { |
---|
76 | }; |
---|
77 | [ |
---|
78 | object, |
---|
79 | uuid(14EB119F-25CE-4654-ABE1-E6742AF03F2D), |
---|
80 | dual, |
---|
81 | oleautomation, |
---|
82 | nonextensible, |
---|
83 | helpstring("ISystemDeviceEnumeratorSpy Interface"), |
---|
84 | pointer_default(unique) |
---|
85 | ] |
---|
86 | interface ISystemDeviceEnumeratorSpy : IDispatch |
---|
87 | { |
---|
88 | }; |
---|
89 | [ |
---|
90 | object, |
---|
91 | uuid(3D1AF248-DEF1-4E26-A071-FEDF15FED6A8), |
---|
92 | dual, |
---|
93 | oleautomation, |
---|
94 | nonextensible, |
---|
95 | helpstring("IFilterGraphHelper Interface"), |
---|
96 | pointer_default(unique) |
---|
97 | ] |
---|
98 | interface IFilterGraphHelper : IDispatch |
---|
99 | { |
---|
100 | [id(DISPID_VALUE), propget] HRESULT FilterGraph([out, retval] IUnknown** ppFilterGraphUnknown); |
---|
101 | [id(DISPID_VALUE), propput] HRESULT FilterGraph([in] IUnknown* pFilterGraphUnknown); |
---|
102 | [id(1), propget] HRESULT Text([out, retval] BSTR* psText); |
---|
103 | [id(2)] HRESULT DoPropertyFrameModal([in] LONG nParentWindowHandle); |
---|
104 | [id(3)] HRESULT DoFilterGraphListModal([in] LONG nParentWindowHandle); |
---|
105 | [id(4)] HRESULT OpenGraphStudioNext([in] LONG nParentWindowHandle, [in] BSTR sMonikerDisplayName, [out, retval] VARIANT_BOOL* pbResult); |
---|
106 | [id(5)] HRESULT OpenGraphEdit([in] LONG nParentWindowHandle, [in] BSTR sMonikerDisplayName, [out, retval] VARIANT_BOOL* pbResult); |
---|
107 | }; |
---|
108 | [ |
---|
109 | uuid(B9EC374B-834B-4DA9-BFB5-C1872CE736FF), |
---|
110 | version(1.0), |
---|
111 | helpstring("Alax.Info Filter Graph Spy 1.0 Type Library") |
---|
112 | ] |
---|
113 | library AlaxInfoDirectShowSpy |
---|
114 | { |
---|
115 | importlib("stdole2.tlb"); |
---|
116 | [ |
---|
117 | object, |
---|
118 | uuid(ACBECDFD-D8CA-49c8-B799-D23225D5BFAD), |
---|
119 | nonextensible, |
---|
120 | helpstring("IFilterGraphAddRemoveHook Interface"), |
---|
121 | pointer_default(unique) |
---|
122 | ] |
---|
123 | interface IFilterGraphAddRemoveHook : IUnknown |
---|
124 | { |
---|
125 | HRESULT OnAddFilter([in] ISpy* pSpy, [in] IUnknown* pBaseFilterUnknown, [in] LPCWSTR pszName, [in, out] BOOL* pbDefault); |
---|
126 | HRESULT OnRemoveFilter([in] ISpy* pSpy, [in] IUnknown* pBaseFilterUnknown, [in, out] BOOL* pbDefault); |
---|
127 | HRESULT OnAddSourceFilter([in] ISpy* pSpy, [in] LPCWSTR pszFileName, [in] LPCWSTR pszFilterName, [out] IUnknown** ppBaseFilterUnknown, [in, out] BOOL* pbDefault); |
---|
128 | HRESULT OnAddSourceFilterForMoniker([in] ISpy* pSpy, [in] IUnknown* pMonikerUnknown, [in] IUnknown* pBindCtxUnknown, [in] LPCWSTR pszFilterName, [out] IUnknown** ppBaseFilterUnknown, [in, out] BOOL* pbDefault); |
---|
129 | }; |
---|
130 | [ |
---|
131 | object, |
---|
132 | uuid(D0F4C168-D09D-481e-903D-7461CE69E391), |
---|
133 | nonextensible, |
---|
134 | helpstring("IFilterGraphConnectHook Interface"), |
---|
135 | pointer_default(unique) |
---|
136 | ] |
---|
137 | interface IFilterGraphConnectHook : IUnknown |
---|
138 | { |
---|
139 | HRESULT OnConnectDirect([in] ISpy* pSpy, [in] IUnknown* pOutputPinUnknown, [in] IUnknown* pInputPinUnknown, [in] const BYTE* pMediaTypeData, [in, out] BOOL* pbDefault); |
---|
140 | HRESULT OnReconnect([in] ISpy* pSpy, [in] IUnknown* pPinUnknown, [in, out] BOOL* pbDefault); |
---|
141 | HRESULT OnDisconnect([in] ISpy* pSpy, [in] IUnknown* pPinUnknown, [in, out] BOOL* pbDefault); |
---|
142 | HRESULT OnConnect([in] ISpy* pSpy, [in] IUnknown* pOutputPinUnknown, [in] IUnknown* pInputPinUnknown, [in, out] BOOL* pbDefault); |
---|
143 | HRESULT OnReconnectEx([in] ISpy* pSpy, [in] IUnknown* pPinUnknown, [in] const BYTE* pMediaTypeData, [in, out] BOOL* pbDefault); |
---|
144 | }; |
---|
145 | [ |
---|
146 | object, |
---|
147 | uuid(65FA1519-A935-4fa9-A15D-9426457E02F6), |
---|
148 | nonextensible, |
---|
149 | helpstring("IFilterGraphStateControlHook Interface"), |
---|
150 | pointer_default(unique) |
---|
151 | ] |
---|
152 | interface IFilterGraphStateControlHook : IUnknown |
---|
153 | { |
---|
154 | HRESULT OnRun([in] ISpy* pSpy, [in, out] BOOL* pbDefault); |
---|
155 | HRESULT OnPause([in] ISpy* pSpy, [in, out] BOOL* pbDefault); |
---|
156 | HRESULT OnStop([in] ISpy* pSpy, [in, out] BOOL* pbDefault); |
---|
157 | }; |
---|
158 | [ |
---|
159 | uuid(F552C23D-F088-41C3-A080-8464D7BB9BAD), |
---|
160 | helpstring("Spy Class") |
---|
161 | ] |
---|
162 | coclass Spy |
---|
163 | { |
---|
164 | [default] interface ISpy; |
---|
165 | //interface ISpyEx; |
---|
166 | interface IModuleVersionInformation; |
---|
167 | }; |
---|
168 | [ |
---|
169 | uuid(2C281C40-8853-4a30-99D3-9DCFF2C015C9), |
---|
170 | helpstring("NoThreadSpy Class") |
---|
171 | ] |
---|
172 | coclass NoThreadSpy |
---|
173 | { |
---|
174 | [default] interface ISpy; |
---|
175 | //interface ISpyEx; |
---|
176 | interface IModuleVersionInformation; |
---|
177 | }; |
---|
178 | [ |
---|
179 | uuid(B6274D9B-1AD3-4c32-83C5-35DC33CAFF47), |
---|
180 | helpstring("FilterMapperSpy Class") |
---|
181 | ] |
---|
182 | coclass FilterMapperSpy |
---|
183 | { |
---|
184 | [default] interface IFilterMapperSpy; |
---|
185 | }; |
---|
186 | [ |
---|
187 | uuid(AD42E3BD-7B9B-4783-9DA2-61A9ACD0D4D2), |
---|
188 | helpstring("SystemDeviceEnumeratorSpy Class") |
---|
189 | ] |
---|
190 | coclass SystemDeviceEnumeratorSpy |
---|
191 | { |
---|
192 | [default] interface ISystemDeviceEnumeratorSpy; |
---|
193 | }; |
---|
194 | [ |
---|
195 | uuid(5A9A684C-A891-4032-8D31-FF6EAB5A0C1E), |
---|
196 | helpstring("FilterGraphHelper Class") |
---|
197 | ] |
---|
198 | coclass FilterGraphHelper |
---|
199 | { |
---|
200 | [default] interface IFilterGraphHelper; |
---|
201 | }; |
---|
202 | [ |
---|
203 | object, |
---|
204 | uuid(E267813C-8F29-4D69-A776-CD462494FCE4), |
---|
205 | dual, |
---|
206 | oleautomation, |
---|
207 | nonextensible, |
---|
208 | helpstring("IRunPropertyBagAware Interface"), |
---|
209 | pointer_default(unique) |
---|
210 | ] |
---|
211 | interface IRunPropertyBagAware : IDispatch |
---|
212 | { |
---|
213 | [propget, id(DISPID_VALUE)] HRESULT Value([out, retval] IUnknown** ppPropertyBagUnknown); |
---|
214 | }; |
---|
215 | [ |
---|
216 | uuid(76127943-D22E-4C4E-9D9B-173C224D0EE4), |
---|
217 | helpstring("RunPropertyBagPropertyPage Class") |
---|
218 | ] |
---|
219 | coclass RunPropertyBagPropertyPage |
---|
220 | { |
---|
221 | [default] interface IUnknown; //IPropertyPage; |
---|
222 | }; |
---|
223 | [ |
---|
224 | object, |
---|
225 | uuid(DA0D924F-1AC0-496D-AE44-CC2BD8CE7CFA), |
---|
226 | dual, |
---|
227 | oleautomation, |
---|
228 | nonextensible, |
---|
229 | helpstring("IRunEventAware Interface"), |
---|
230 | pointer_default(unique) |
---|
231 | ] |
---|
232 | interface IRunEventAware : IDispatch |
---|
233 | { |
---|
234 | [propget, id(DISPID_VALUE)] HRESULT Value([out, retval] VARIANT* pvValue); |
---|
235 | [propget, id(1)] HRESULT Capture([out, retval] VARIANT_BOOL* pbCapture); |
---|
236 | [propput, id(1)] HRESULT Capture([in] VARIANT_BOOL bCapture); |
---|
237 | }; |
---|
238 | [ |
---|
239 | uuid(AD0E84E9-DE25-4C1A-85A5-47406604E144), |
---|
240 | helpstring("RunEventPropertyPage Class") |
---|
241 | ] |
---|
242 | coclass RunEventPropertyPage |
---|
243 | { |
---|
244 | [default] interface IUnknown; //IPropertyPage; |
---|
245 | }; |
---|
246 | }; |
---|