source: trunk/DirectShowSpy/Module.idl @ 617

Last change on this file since 617 was 617, checked in by roman, 8 years ago

Exported function signatures replaced to accurately rundll32 compatible; added IModuleVersionInformation implementation to FilterGraphHelper?; added debug Host01 project; IFilterGraphHelper interface is extended with MediaSampleTrace? related automation methods; MediaSampleTrace? UI is extended to support data load from external file

File size: 11.8 KB
Line 
1////////////////////////////////////////////////////////////
2// Copyright (C) Roman Ryltsov, 2008-2015
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 don’t 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
16import "oaidl.idl";
17import "ocidl.idl";
18
19[
20        object,
21        uuid(A7490000-3A5D-455D-9B81-2025B74CD4CD),
22        nonextensible,
23        helpstring("ISpyEx Interface"),
24        pointer_default(unique)
25]
26interface ISpyEx : IUnknown
27{
28};
29[
30        uuid(B9EC374B-834B-4DA9-BFB5-C1872CE736FF),
31        version(1.0),
32        helpstring("Alax.Info Filter Graph Spy 1.0 Type Library")
33]
34library AlaxInfoDirectShowSpy
35{
36        importlib("stdole2.tlb");
37        [
38                object,
39                uuid(968E0597-E713-4EF5-A6F3-780B816204C2),
40                dual,
41                oleautomation,
42                nonextensible,
43                helpstring("IModuleVersionInformation Interface"),
44                pointer_default(unique)
45        ]
46        interface IModuleVersionInformation : IDispatch
47        {
48                [id(1), propget] HRESULT Path([out, retval] BSTR* psPath);
49                [id(2), propget] HRESULT FileVersion([out, retval] LONGLONG* pnFileVersion);
50                [id(3), propget] HRESULT FileVersionString([out, retval] BSTR* psFileVersionString);
51        };
52        [
53                object,
54                uuid(B8270A07-1A10-41B1-B5A6-D8D9397020A8),
55                nonextensible,
56                helpstring("IMediaSampleTrace Interface"),
57                pointer_default(unique)
58        ]
59        interface IMediaSampleTrace : IUnknown
60        {
61                HRESULT RegisterNewSegment([in] IUnknown* pBaseFilterUnknown, [in] const WCHAR* pszStreamName, [in] LONGLONG nStartTime, [in] LONGLONG nStopTime, [in] DOUBLE fRate, [in] const WCHAR* pszComment, [in] USHORT nHighlight);
62                HRESULT RegisterMediaSample([in] IUnknown* pBaseFilterUnknown, [in] const WCHAR* pszStreamName, [in] const BYTE* pnSamplePropertiesData, [in] const WCHAR* pszComment, [in] USHORT nHighlight);
63                HRESULT RegisterEndOfStream([in] IUnknown* pBaseFilterUnknown, [in] const WCHAR* pszStreamName, [in] const WCHAR* pszComment, [in] USHORT nHighlight);
64                HRESULT RegisterComment([in] IUnknown* pBaseFilterUnknown, [in] const WCHAR* pszStreamName, [in] const WCHAR* pszComment, [in] USHORT nHighlight);
65        };
66        [
67                object,
68                uuid(6945711B-FE0F-4C54-965F-5B67969C28B7),
69                dual,
70                oleautomation,
71                nonextensible,
72                helpstring("ISpy Interface"),
73                pointer_default(unique)
74        ]
75        interface ISpy : IDispatch
76        {
77                [id(1), propget] HRESULT MonikerDisplayName([out, retval] BSTR* psMonikerDisplayName);
78                [id(2), propget] HRESULT CreationTime([out, retval] DATE* pfTime);
79                [id(3), propget] HRESULT FriendlyName([out, retval] BSTR* psFriendlyName);
80                [id(3), propput] HRESULT FriendlyName([in] BSTR sFriendlyName);
81                [id(4)] HRESULT DoPropertyFrameModal([in] LONG nParentWindowHandle);
82                [id(5)] HRESULT DoFilterGraphListModal([in] LONG nParentWindowHandle);
83                [id(6)] HRESULT OpenGraphStudioNext([in] LONG nParentWindowHandle, [out, retval] VARIANT_BOOL* pbResult);
84                [id(7)] HRESULT OpenGraphEdit([in] LONG nParentWindowHandle, [out, retval] VARIANT_BOOL* pbResult);
85                [id(8)] HRESULT ReadRunPropertyBag([in] IUnknown* pBaseFilterUnknown, [in] VARIANT_BOOL bAllowExtension, [out, retval] VARIANT* pvValue);
86                [id(9)] HRESULT CreateMediaSampleTrace([out, retval] IMediaSampleTrace** ppMediaSampleTrace);
87        };
88        [
89                object,
90                uuid(E59EED72-E94A-44D9-8C1F-6535A4C1D6C9),
91                dual,
92                oleautomation,
93                nonextensible,
94                helpstring("IFilterGraphMemoryAllocatorData Interface"),
95                pointer_default(unique)
96        ]
97        interface IFilterGraphMemoryAllocatorData : IDispatch
98        {
99                [id(DISPID_VALUE), propget] HRESULT Value([out, retval] VARIANT* pvValue);
100        };
101        [
102                uuid(F552C23D-F088-41C3-A080-8464D7BB9BAD),
103                helpstring("Spy Class")
104        ]
105        coclass Spy
106        {
107                [default] interface ISpy;
108                //interface ISpyEx;
109                interface IModuleVersionInformation;
110                interface IFilterGraphMemoryAllocatorData;
111        };
112        [
113                object,
114                uuid(ACBECDFD-D8CA-49c8-B799-D23225D5BFAD),
115                nonextensible,
116                helpstring("IFilterGraphAddRemoveHook Interface"),
117                pointer_default(unique)
118        ]
119        interface IFilterGraphAddRemoveHook : IUnknown
120        {
121                HRESULT OnAddFilter([in] ISpy* pSpy, [in] IUnknown* pBaseFilterUnknown, [in] LPCWSTR pszName, [in, out] BOOL* pbDefault);
122                HRESULT OnRemoveFilter([in] ISpy* pSpy, [in] IUnknown* pBaseFilterUnknown, [in, out] BOOL* pbDefault);
123                HRESULT OnAddSourceFilter([in] ISpy* pSpy, [in] LPCWSTR pszFileName, [in] LPCWSTR pszFilterName, [out] IUnknown** ppBaseFilterUnknown, [in, out] BOOL* pbDefault);
124                HRESULT OnAddSourceFilterForMoniker([in] ISpy* pSpy, [in] IUnknown* pMonikerUnknown, [in] IUnknown* pBindCtxUnknown, [in] LPCWSTR pszFilterName, [out] IUnknown** ppBaseFilterUnknown, [in, out] BOOL* pbDefault);
125        };
126        [
127                object,
128                uuid(D0F4C168-D09D-481e-903D-7461CE69E391),
129                nonextensible,
130                helpstring("IFilterGraphConnectHook Interface"),
131                pointer_default(unique)
132        ]
133        interface IFilterGraphConnectHook : IUnknown
134        {
135                HRESULT OnConnectDirect([in] ISpy* pSpy, [in] IUnknown* pOutputPinUnknown, [in] IUnknown* pInputPinUnknown, [in] const BYTE* pMediaTypeData, [in, out] BOOL* pbDefault);
136                HRESULT OnReconnect([in] ISpy* pSpy, [in] IUnknown* pPinUnknown, [in, out] BOOL* pbDefault);
137                HRESULT OnDisconnect([in] ISpy* pSpy, [in] IUnknown* pPinUnknown, [in, out] BOOL* pbDefault);
138                HRESULT OnConnect([in] ISpy* pSpy, [in] IUnknown* pOutputPinUnknown, [in] IUnknown* pInputPinUnknown, [in, out] BOOL* pbDefault);
139                HRESULT OnReconnectEx([in] ISpy* pSpy, [in] IUnknown* pPinUnknown, [in] const BYTE* pMediaTypeData, [in, out] BOOL* pbDefault);
140        };
141        [
142                object,
143                uuid(65FA1519-A935-4fa9-A15D-9426457E02F6),
144                nonextensible,
145                helpstring("IFilterGraphStateControlHook Interface"),
146                pointer_default(unique)
147        ]
148        interface IFilterGraphStateControlHook : IUnknown
149        {
150                HRESULT OnRun([in] ISpy* pSpy, [in, out] BOOL* pbDefault);
151                HRESULT OnPause([in] ISpy* pSpy, [in, out] BOOL* pbDefault);
152                HRESULT OnStop([in] ISpy* pSpy, [in, out] BOOL* pbDefault);
153        };
154        [
155                uuid(2C281C40-8853-4a30-99D3-9DCFF2C015C9),
156                helpstring("NoThreadSpy Class")
157        ]
158        coclass NoThreadSpy
159        {
160                [default] interface ISpy;
161                //interface ISpyEx;
162                interface IModuleVersionInformation;
163                interface IFilterGraphMemoryAllocatorData;
164        };
165        [
166                uuid(A4AE1D54-92B3-4F11-B351-AC483155D914),
167                helpstring("PrivateThreadSpy Class")
168        ]
169        coclass PrivateThreadSpy
170        {
171                [default] interface ISpy;
172                //interface ISpyEx;
173                interface IModuleVersionInformation;
174                interface IFilterGraphMemoryAllocatorData;
175        };
176        [
177                object,
178                uuid(34B280D7-A144-4a64-BCB9-3616896F6877),
179                dual,
180                oleautomation,
181                nonextensible,
182                helpstring("IFilterMapperSpy Interface"),
183                pointer_default(unique)
184        ]
185        interface IFilterMapperSpy : IDispatch
186        {
187        };
188        [
189                uuid(B6274D9B-1AD3-4c32-83C5-35DC33CAFF47),
190                helpstring("FilterMapperSpy Class")
191        ]
192        coclass FilterMapperSpy
193        {
194                [default] interface IFilterMapperSpy;
195        };
196        [
197                object,
198                uuid(14EB119F-25CE-4654-ABE1-E6742AF03F2D),
199                dual,
200                oleautomation,
201                nonextensible,
202                helpstring("ISystemDeviceEnumeratorSpy Interface"),
203                pointer_default(unique)
204        ]
205        interface ISystemDeviceEnumeratorSpy : IDispatch
206        {
207        };
208        [
209                uuid(AD42E3BD-7B9B-4783-9DA2-61A9ACD0D4D2),
210                helpstring("SystemDeviceEnumeratorSpy Class")
211        ]
212        coclass SystemDeviceEnumeratorSpy
213        {
214                [default] interface ISystemDeviceEnumeratorSpy;
215        };
216        [
217                object,
218                uuid(3D1AF248-DEF1-4E26-A071-FEDF15FED6A8),
219                dual,
220                oleautomation,
221                nonextensible,
222                helpstring("IFilterGraphHelper Interface"),
223                pointer_default(unique)
224        ]
225        interface IFilterGraphHelper : IDispatch
226        {
227                [id(DISPID_VALUE), propget] HRESULT FilterGraph([out, retval] IUnknown** ppFilterGraphUnknown);
228                [id(DISPID_VALUE), propput] HRESULT FilterGraph([in] IUnknown* pFilterGraphUnknown);
229                [id(1), propget] HRESULT Text([out, retval] BSTR* psText);
230                [id(2)] HRESULT DoPropertyFrameModal([in] LONG nParentWindowHandle);
231                [id(3)] HRESULT DoFilterGraphListModal([in] LONG nParentWindowHandle);
232                [id(4)] HRESULT OpenGraphStudioNext([in] LONG nParentWindowHandle, [in] BSTR sMonikerDisplayName, [out, retval] VARIANT_BOOL* pbResult);
233                [id(5)] HRESULT OpenGraphEdit([in] LONG nParentWindowHandle, [in] BSTR sMonikerDisplayName, [out, retval] VARIANT_BOOL* pbResult);
234                [id(6), propget] HRESULT Options([out, retval] VARIANT* pvOptions);
235                [id(6), propput] HRESULT Options([in] VARIANT vOptions);
236                [id(7)] HRESULT ResetMediaSampleTrace([in] VARIANT vProcessIdentifier);
237                [id(8)] HRESULT LockMediaSampleTrace([out, retval] IUnknown** ppLockUnknown);
238                [id(9)] HRESULT GetMediaSampleTrace([in] VARIANT vProcessIdentifier, [out, retval] BSTR* psText);
239        };
240        [
241                uuid(5A9A684C-A891-4032-8D31-FF6EAB5A0C1E),
242                helpstring("FilterGraphHelper Class")
243        ]
244        coclass FilterGraphHelper
245        {
246                [default] interface IFilterGraphHelper;
247                interface IModuleVersionInformation;
248        };
249        [
250                object,
251                uuid(E267813C-8F29-4D69-A776-CD462494FCE4),
252                dual,
253                oleautomation,
254                nonextensible,
255                helpstring("IRunPropertyBagAware Interface"),
256                pointer_default(unique)
257        ]
258        interface IRunPropertyBagAware : IDispatch
259        {
260                [propget, id(DISPID_VALUE)] HRESULT Value([out, retval] IUnknown** ppPropertyBagUnknown);
261        };
262        [
263                uuid(76127943-D22E-4C4E-9D9B-173C224D0EE4),
264                helpstring("RunPropertyBagPropertyPage Class")
265        ]
266        coclass RunPropertyBagPropertyPage
267        {
268                [default] interface IUnknown; //IPropertyPage;
269        };
270        [
271                object,
272                uuid(DA0D924F-1AC0-496D-AE44-CC2BD8CE7CFA),
273                dual,
274                oleautomation,
275                nonextensible,
276                helpstring("IRunEventAware Interface"),
277                pointer_default(unique)
278        ]
279        interface IRunEventAware : IDispatch
280        {
281                [propget, id(DISPID_VALUE)] HRESULT Value([out, retval] VARIANT* pvValue);
282                [propget, id(1)] HRESULT Capture([out, retval] VARIANT_BOOL* pbCapture);
283                [propput, id(1)] HRESULT Capture([in] VARIANT_BOOL bCapture);
284        };
285        [
286                uuid(AD0E84E9-DE25-4C1A-85A5-47406604E144),
287                helpstring("RunEventPropertyPage Class")
288        ]
289        coclass RunEventPropertyPage
290        {
291                [default] interface IUnknown; //IPropertyPage;
292        };
293        [
294                object,
295                uuid(ECDC55A1-FFD7-4999-BAB5-579D5773F0B6),
296                dual,
297                oleautomation,
298                nonextensible,
299                pointer_default(unique)
300        ]
301        interface IFilterGraphTableItem : IDispatch
302        {
303                [id(DISPID_VALUE), propget] HRESULT FilterGraph([out, retval] IUnknown** ppFilterGraphUnknown);
304                [id(DISPID_VALUE), propput] HRESULT FilterGraph([in] IUnknown* pFilterGraphUnknown);
305                [id(1), propget] HRESULT Time([out, retval] DATE* pfTime);
306        };
307        [
308                uuid(7B2E1768-3037-4975-ABA1-BA626397BF08)
309        ]
310        coclass FilterGraphTableItem
311        {
312                [default] interface IFilterGraphTableItem;
313        };
314        [
315                object,
316                uuid(15078C09-6D0C-4284-924C-F6CD13CA39F6),
317                dual,
318                oleautomation,
319                nonextensible,
320                pointer_default(unique)
321        ]
322        interface IFilterGraphTable : IDispatch
323        {
324                [id(DISPID_NEWENUM), propget, restricted] HRESULT _NewEnum([out, retval] IUnknown** ppEnum);
325                [id(DISPID_VALUE), propget] HRESULT Item([in] VARIANT vIndex, [out, retval] VARIANT* pvItem);
326                [id(1), propget] HRESULT Count([out, retval] LONG* pnCount);
327        };
328        [
329                uuid(44EF31BC-CC5F-4163-8832-BDC79ED59162)
330        ]
331        coclass FilterGraphTable
332        {
333                [default] interface IFilterGraphTable;
334        };
335        [
336                object,
337                uuid(D9A734F0-3230-4574-81FA-71DE297ACDF8),
338                dual,
339                oleautomation,
340                nonextensible,
341                pointer_default(unique)
342        ]
343        interface IFilterGraphTableActiveObject : IDispatch
344        {
345                [id(1)] HRESULT GetFilterGraphs([out] LONG* pnProcessIdentifier, [out] VARIANT* pvArray);
346        };
347};
Note: See TracBrowser for help on using the repository browser.