1 /*
2  * PROJECT:         ReactOS api tests
3  * LICENSE:         GPLv2+ - See COPYING in the top level directory
4  * PURPOSE:         COM interface test for shdocvw classes
5  * PROGRAMMER:      Thomas Faber <thomas.faber@reactos.org>
6  */
7 
8 #include "com_apitest.h"
9 
10 #define NDEBUG
11 #include <debug.h>
12 
13 static const CLASS_AND_INTERFACES ExpectedInterfaces[] =
14 {
15     {
16         ID_NAME(CLSID_AdminFolderShortcut),
17         {
18             {    0x0,   &IID_IShellFolder2 },
19             {    0x0,       &IID_IShellFolder },
20             {    0x0,           &IID_IUnknown },
21             {    0x4,   &IID_IPersistFolder3 },
22             {    0x4,       &IID_IPersistFolder2 },
23             {    0x4,           &IID_IPersistFolder },
24             {    0x4,               &IID_IPersist },
25             {    0x8,   &IID_IShellLinkA },
26             {    0xc,   &IID_IShellLinkW },
27             {   0x10,   &IID_IPersistFile },
28             {   0x14,   &IID_IExtractIconW },
29             {   0x18,   &IID_IQueryInfo },
30             {   0x20,   &IID_IPersistStream },
31             {   0x20,   &IID_IPersistStreamInit },
32             {   0x24,   &IID_IPersistPropertyBag },
33             {   0x28,   &IID_IBrowserFrameOptions },
34         }
35     },
36     {
37         ID_NAME(CLSID_ExplorerBand),
38         {
39             {  -0xb4,   &IID_IDeskBand },
40             {  -0xb4,       &IID_IDockingWindow },
41             {  -0xb4,           &IID_IOleWindow },
42             {  -0xb0,   &IID_IObjectWithSite },
43             {  -0xa8,   &IID_IInputObject },
44             {  -0xa4,   &IID_IPersistStream },
45             {  -0xa4,       &IID_IPersist },
46             {  -0xa0,   &IID_IOleCommandTarget },
47             {  -0x9c,   &IID_IServiceProvider },
48             {  -0x84,   &IID_IContextMenu },
49             {  -0x80,   &IID_IBandNavigate },
50             {  -0x7c,   &IID_IWinEventHandler },
51             {  -0x78,   &IID_INamespaceProxy },
52             {    0x0,   &IID_IDispatch },
53             {    0x0,       &IID_IUnknown },
54         }
55     },
56     {
57         ID_NAME(CLSID_FontsFolderShortcut),
58         {
59             {    0x0,   &IID_IShellFolder2 },
60             {    0x0,       &IID_IShellFolder },
61             {    0x0,           &IID_IUnknown },
62             {    0x4,   &IID_IPersistFolder3 },
63             {    0x4,       &IID_IPersistFolder2 },
64             {    0x4,           &IID_IPersistFolder },
65             {    0x4,               &IID_IPersist },
66             {    0x8,   &IID_IShellLinkA },
67             {    0xc,   &IID_IShellLinkW },
68             {   0x10,   &IID_IPersistFile },
69             {   0x14,   &IID_IExtractIconW },
70             {   0x18,   &IID_IQueryInfo },
71             {   0x20,   &IID_IPersistStream },
72             {   0x20,   &IID_IPersistStreamInit },
73             {   0x24,   &IID_IPersistPropertyBag },
74             {   0x28,   &IID_IBrowserFrameOptions },
75         }
76     },
77 #if 0 // E_OUTOFMEMORY?
78     {
79         ID_NAME(CLSID_ShellDispatchInproc),
80         {
81             {    0x0,   &IID_IUnknown },
82         }
83     },
84 #endif
85     {
86         ID_NAME(CLSID_MruLongList),
87         {
88             {    0x0,   &IID_IMruDataList },
89             {    0x0,   &IID_IUnknown },
90         }
91     },
92     {
93         ID_NAME(CLSID_MruPidlList),
94         {
95             {    0x0,   &IID_IMruPidlList },
96             {    0x0,   &IID_IUnknown },
97         }
98     },
99     {
100         ID_NAME(CLSID_SH_FavBand),
101         {
102             {  -0x30,   &IID_IDeskBand },
103             {  -0x30,       &IID_IDockingWindow },
104             {  -0x30,           &IID_IOleWindow },
105             {  -0x2c,   &IID_IObjectWithSite },
106             {  -0x24,   &IID_IInputObject },
107             {  -0x20,   &IID_IPersistStream },
108             {  -0x20,       &IID_IPersist },
109             {  -0x1c,   &IID_IOleCommandTarget },
110             {  -0x18,   &IID_IServiceProvider },
111             {    0x0,   &IID_IContextMenu },
112             {    0x0,       &IID_IUnknown },
113             {    0x4,   &IID_IBandNavigate },
114             {    0x8,   &IID_IWinEventHandler },
115             {    0xc,   &IID_INamespaceProxy },
116         }
117     },
118     {
119         ID_NAME(CLSID_SH_HistBand),
120         {
121             {  -0xb4,   &IID_IDeskBand },
122             {  -0xb4,       &IID_IDockingWindow },
123             {  -0xb4,           &IID_IOleWindow },
124             {  -0xb0,   &IID_IObjectWithSite },
125             {  -0xa8,   &IID_IInputObject },
126             {  -0xa4,   &IID_IPersistStream },
127             {  -0xa4,       &IID_IPersist },
128             {  -0xa0,   &IID_IOleCommandTarget },
129             {  -0x9c,   &IID_IServiceProvider },
130             {  -0x84,   &IID_IContextMenu },
131             {  -0x80,   &IID_IBandNavigate },
132             {  -0x7c,   &IID_IWinEventHandler },
133             {  -0x78,   &IID_INamespaceProxy },
134             {    0x0,   &IID_IShellFolderSearchableCallback },
135             {    0x0,       &IID_IUnknown },
136         }
137     },
138     {
139         ID_NAME(CLSID_SearchAssistantOC),
140         {
141             {    0x0,   &IID_ISearchAssistantOC3 },
142             {    0x0,       &IID_ISearchAssistantOC },
143             {    0x0,           &IID_IDispatch },
144             {    0x0,               &IID_IUnknown },
145             {    0x4,   &IID_IProvideClassInfo2 },
146             {    0x4,       &IID_IProvideClassInfo },
147             {    0x8,   &IID_IQuickActivate },
148             {    0xc,   &IID_IOleControl },
149             {   0x10,   &IID_IOleObject },
150             {   0x14,   &IID_IOleInPlaceActiveObject },
151             {   0x18,   &IID_IViewObjectEx },
152             {   0x18,       &IID_IViewObject2 },
153             {   0x18,           &IID_IViewObject },
154             {   0x1c,   &IID_IOleInPlaceObjectWindowless },
155             {   0x1c,       &IID_IOleInPlaceObject },
156             {   0x1c,           &IID_IOleWindow },
157             {   0x20,   &IID_IDataObject },
158             {   0x30,   &IID_IConnectionPointContainer },
159             {   0x34,   &IID_IObjectSafety },
160             {   0x3c,   &IID_IOleCommandTarget },
161             {   0x40,   &IID_IObjectWithSite },
162         }
163     },
164     {
165         ID_NAME(CLSID_SearchBand),
166         {
167             {    0x0,   &IID_IContextMenu },
168             {    0x0,       &IID_IUnknown },
169             {    0x4,   &IID_IShellExtInit },
170             {    0x8,   &IID_IPersistPropertyBag },
171             {    0x8,       &IID_IPersist },
172         }
173     },
174     {
175         ID_NAME(CLSID_ShellSearchAssistantOC),
176         {
177             {    0x0,   &IID_ISearchAssistantOC3 },
178             {    0x0,       &IID_ISearchAssistantOC },
179             {    0x0,           &IID_IDispatch },
180             {    0x0,               &IID_IUnknown },
181             {    0x4,   &IID_IProvideClassInfo2 },
182             {    0x4,       &IID_IProvideClassInfo },
183             {    0x8,   &IID_IQuickActivate },
184             {    0xc,   &IID_IOleControl },
185             {   0x10,   &IID_IOleObject },
186             {   0x14,   &IID_IOleInPlaceActiveObject },
187             {   0x18,   &IID_IViewObjectEx },
188             {   0x18,       &IID_IViewObject2 },
189             {   0x18,           &IID_IViewObject },
190             {   0x1c,   &IID_IOleInPlaceObjectWindowless },
191             {   0x1c,       &IID_IOleInPlaceObject },
192             {   0x1c,           &IID_IOleWindow },
193             {   0x20,   &IID_IDataObject },
194             {   0x30,   &IID_IConnectionPointContainer },
195             {   0x34,   &IID_IObjectSafety },
196             {   0x3c,   &IID_IOleCommandTarget },
197             {   0x40,   &IID_IObjectWithSite },
198         }
199     },
200     {
201         ID_NAME(CLSID_ShellShellNameSpace),
202         {
203             {    0x0,   &IID_IShellNameSpace },
204             {    0x0,       &IID_IShellFavoritesNameSpace },
205             {    0x0,           &IID_IDispatch },
206             {    0x0,               &IID_IUnknown },
207             {    0x4,   &IID_IProvideClassInfo2 },
208             {    0x4,       &IID_IProvideClassInfo },
209             {    0x8,   &IID_IPersistStreamInit },
210             {    0xc,   &IID_IPersistPropertyBag },
211             {   0x10,   &IID_IQuickActivate },
212             {   0x14,   &IID_IOleControl },
213             {   0x18,   &IID_IOleObject },
214             {   0x1c,   &IID_IOleInPlaceActiveObject },
215             {   0x20,   &IID_IViewObjectEx },
216             {   0x20,       &IID_IViewObject2 },
217             {   0x20,           &IID_IViewObject },
218             {   0x24,   &IID_IOleInPlaceObjectWindowless },
219             {   0x24,       &IID_IOleInPlaceObject },
220             {   0x24,           &IID_IOleWindow },
221             {   0x28,   &IID_ISpecifyPropertyPages },
222             {   0x38,   &IID_IConnectionPointContainer },
223             {   0x3c,   &IID_IShellChangeNotify },
224             {   0x40,   &IID_IDropTarget },
225             {   0xb4,   &IID_IObjectWithSite },
226             {   0xbc,   &IID_INSCTree2 },
227             {   0xbc,       &IID_INSCTree },
228             {   0xc0,   &IID_IWinEventHandler },
229             {   0xc4,   &IID_IShellBrowser },
230             {   0xc8,   &IID_IFolderFilterSite },
231         }
232     },
233     {
234         ID_NAME(CLSID_TaskbarList),
235         {
236             {    0x0,   &IID_ITaskbarList2 },
237             {    0x0,       &IID_ITaskbarList },
238             {    0x0,           &IID_IUnknown },
239         }
240     },
241     {
242         ID_NAME(CLSID_AttachmentServices ),
243         {
244             {    0x0,   &IID_IAttachmentExecute },
245             {    0x0,       &IID_IUnknown },
246         }
247     },
248 };
249 static const INT ExpectedInterfaceCount = RTL_NUMBER_OF(ExpectedInterfaces);
250 
251 START_TEST(shdocvw)
252 {
253     TestClasses(L"shdocvw", ExpectedInterfaces, ExpectedInterfaceCount);
254 }
255