source: trunk/DirectShowSpy/DirectShowSpy.idl @ 302

Last change on this file since 302 was 290, checked in by roman, 10 years ago

Added runtime event interface and generic property page

  • Property svn:keywords set to Id
File size: 8.1 KB
Line 
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 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(968E0597-E713-4EF5-A6F3-780B816204C2),
22        dual,
23        oleautomation,
24        nonextensible,
25        helpstring("IModuleVersionInformation Interface"),
26        pointer_default(unique)
27]
28interface 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]
43interface 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]
62interface 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]
74interface 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]
86interface 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]
98interface 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]
113library 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                nonextensible,
206                helpstring("IRunPropertyBagAware Interface"),
207                pointer_default(unique)
208        ]
209        interface IRunPropertyBagAware : IDispatch
210        {
211                [propget, id(DISPID_VALUE)] HRESULT Value([out, retval] IUnknown** ppPropertyBagUnknown);
212        };
213        [
214                uuid(76127943-D22E-4C4E-9D9B-173C224D0EE4),
215                helpstring("RunPropertyBagPropertyPage Class")
216        ]
217        coclass RunPropertyBagPropertyPage
218        {
219                [default] interface IUnknown; //IPropertyPage;
220        };
221        [
222                object,
223                uuid(DA0D924F-1AC0-496D-AE44-CC2BD8CE7CFA),
224                nonextensible,
225                helpstring("IRunEventAware Interface"),
226                pointer_default(unique)
227        ]
228        interface IRunEventAware : IDispatch
229        {
230                [propget, id(DISPID_VALUE)] HRESULT Value([out, retval] VARIANT* pvValue);
231                [propget, id(1)] HRESULT Capture([out, retval] VARIANT_BOOL* pbCapture);
232                [propput, id(1)] HRESULT Capture([in] VARIANT_BOOL bCapture);
233        };
234        [
235                uuid(AD0E84E9-DE25-4C1A-85A5-47406604E144),
236                helpstring("RunEventPropertyPage Class")
237        ]
238        coclass RunEventPropertyPage
239        {
240                [default] interface IUnknown; //IPropertyPage;
241        };
242};
Note: See TracBrowser for help on using the repository browser.