ReactOS 0.4.15-dev-7788-g1ad9096
activex.c
Go to the documentation of this file.
1/*
2 * Copyright 2010 Jacek Caban for CodeWeavers
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
17 */
18
19#include "precomp.h"
20
21#include <test_tlb.h>
22
23#define DEFINE_EXPECT(func) \
24 static BOOL expect_ ## func = FALSE, called_ ## func = FALSE
25
26#define SET_EXPECT(func) \
27 do { called_ ## func = FALSE; expect_ ## func = TRUE; } while(0)
28
29#define CHECK_EXPECT2(func) \
30 do { \
31 ok(expect_ ##func, "unexpected call " #func "\n"); \
32 called_ ## func = TRUE; \
33 }while(0)
34
35#define CHECK_EXPECT(func) \
36 do { \
37 CHECK_EXPECT2(func); \
38 expect_ ## func = FALSE; \
39 }while(0)
40
41#define CHECK_CALLED(func) \
42 do { \
43 ok(called_ ## func, "expected " #func "\n"); \
44 expect_ ## func = called_ ## func = FALSE; \
45 }while(0)
46
47#define CLEAR_CALLED(func) \
48 expect_ ## func = called_ ## func = FALSE
49
50#undef GetClassInfo
51
52DEFINE_EXPECT(CreateInstance);
53DEFINE_EXPECT(FreezeEvents_TRUE);
54DEFINE_EXPECT(FreezeEvents_FALSE);
56DEFINE_EXPECT(IPersistPropertyBag_InitNew);
57DEFINE_EXPECT(IPersistPropertyBag_Load);
58DEFINE_EXPECT(Invoke_READYSTATE);
59DEFINE_EXPECT(Invoke_ENABLED);
60DEFINE_EXPECT(Invoke_VALID);
61DEFINE_EXPECT(Invoke_SECURITYCTX);
62DEFINE_EXPECT(Invoke_SCRIPTPROP);
63DEFINE_EXPECT(Invoke_SCRIPTCALL);
64DEFINE_EXPECT(GetIDsOfNames_scriptprop);
66DEFINE_EXPECT(SetExtent);
67DEFINE_EXPECT(GetExtent);
68DEFINE_EXPECT(SetClientSite);
69DEFINE_EXPECT(SetClientSite_NULL);
71DEFINE_EXPECT(InPlaceObject_GetWindow);
72DEFINE_EXPECT(SetObjectRects);
73DEFINE_EXPECT(InPlaceDeactivate);
74DEFINE_EXPECT(UIDeactivate);
75DEFINE_EXPECT(QueryService_TestActiveX);
76DEFINE_EXPECT(GetMiscStatus);
77DEFINE_EXPECT(SetAdvise);
78DEFINE_EXPECT(GetViewStatus);
79DEFINE_EXPECT(QI_ITestActiveX);
83DEFINE_EXPECT(OnAmbientPropertyChange_UNKNOWN);
84DEFINE_EXPECT(GetTypeInfo);
86DEFINE_EXPECT(FindConnectionPoint);
88DEFINE_EXPECT(Unadvise);
89
90#define DISPID_SCRIPTPROP 1000
91#define DISPID_SCRIPTCALL 1001
92
93enum {
97};
98
104
105#define TESTACTIVEX_CLSID "{178fc163-f585-4e24-9c13-4bb7f6680746}"
106
108 {0x178fc163,0xf585,0x4e24,{0x9c,0x13,0x4b,0xb7,0xf6,0x68,0x07,0x46}};
109
110static const GUID IID_ITestActiveX =
111 {0x178fc663,0xf585,0x4e24,{0x9c,0x13,0x4b,0xb7,0xf6,0x68,0x07,0x46}};
112
113static const char object_ax_str[] =
114 "<html><head></head><body>"
115 "<object classid=\"clsid:" TESTACTIVEX_CLSID "\" width=\"300\" height=\"200\" id=\"objid\">"
116 "<param name=\"param_name\" value=\"param_value\">"
117 "<param name=\"num_param\" value=\"3\">"
118 "</object>"
119 "<script>"
120 "objid.scriptCall();"
121 "</script>"
122 "</body></html>";
123
124static const char event_binding_str[] =
125 "<html><head></head><body>"
126 "<object classid=\"clsid:" TESTACTIVEX_CLSID "\" width=\"300\" height=\"200\" id=\"objid\">"
127 "<param name=\"param_name\" value=\"param_value\">"
128 "<param name=\"num_param\" value=\"3\">"
129 "</object>"
130 "<script for=\"objid\" event=\"testfunc\">return 6;</script>"
131 "<script for=\"objid\" event=\"testfunc2(x,y)\">return x+2*y;</script>"
132 "</body></html>";
133
137 &IID_IAdviseSinkEx,
142 &IID_IOleInPlaceSiteEx,
144 &IID_IBindHost,
145 &IID_IServiceProvider,
146 NULL
147};
148
149static BOOL iface_cmp(IUnknown *iface1, IUnknown *iface2)
150{
151 IUnknown *unk1, *unk2;
152
153 if(iface1 == iface2)
154 return TRUE;
155
156 IUnknown_QueryInterface(iface1, &IID_IUnknown, (void**)&unk1);
157 IUnknown_Release(unk1);
158 IUnknown_QueryInterface(iface2, &IID_IUnknown, (void**)&unk2);
159 IUnknown_Release(unk2);
160
161 return unk1 == unk2;
162}
163
164#define test_ifaces(i,ids) _test_ifaces(__LINE__,i,ids)
165static void _test_ifaces(unsigned line, IUnknown *iface, REFIID *iids)
166{
167 const IID * const *piid;
168 IUnknown *unk;
170
171 for(piid = iids; *piid; piid++) {
172 hres = IUnknown_QueryInterface(iface, *piid, (void**)&unk);
173 ok_(__FILE__,line) (hres == S_OK, "Could not get %s interface: %08x\n", wine_dbgstr_guid(*piid), hres);
174 if(SUCCEEDED(hres))
175 IUnknown_Release(unk);
176 }
177}
178
179static int strcmp_wa(LPCWSTR strw, const char *stra)
180{
181 CHAR buf[512];
182 WideCharToMultiByte(CP_ACP, 0, strw, -1, buf, sizeof(buf), NULL, NULL);
183 return lstrcmpA(stra, buf);
184}
185
186static BSTR a2bstr(const char *str)
187{
188 BSTR ret;
189 int len;
190
191 len = MultiByteToWideChar(CP_ACP, 0, str, -1, NULL, 0);
194
195 return ret;
196}
197
200static READYSTATE plugin_readystate = READYSTATE_UNINITIALIZED;
202
203static void set_plugin_readystate(READYSTATE state)
204{
205 IPropertyNotifySink *prop_notif;
207
209
210 hres = IOleClientSite_QueryInterface(client_site, &IID_IPropertyNotifySink, (void**)&prop_notif);
211 ok(hres == S_OK, "Could not get IPropertyNotifySink iface: %08x\n", hres);
212
213 hres = IPropertyNotifySink_OnChanged(prop_notif, DISPID_READYSTATE);
214 ok(hres == S_OK, "OnChanged(DISPID_READYSTATE) failed: %08x\n", hres);
215
216 IPropertyNotifySink_Release(prop_notif);
217}
218
219static void test_mon_displayname(IMoniker *mon, const char *exname, const char *broken_name)
220{
221 LPOLESTR display_name;
222 DWORD mksys;
224
225 hres = IMoniker_GetDisplayName(mon, NULL, NULL, &display_name);
226 ok(hres == S_OK, "GetDisplayName failed: %08x\n", hres);
227 ok(!strcmp_wa(display_name, exname) || broken(broken_name && !strcmp_wa(display_name, broken_name)),
228 "display_name = %s\n", wine_dbgstr_w(display_name));
229 CoTaskMemFree(display_name);
230
231 hres = IMoniker_IsSystemMoniker(mon, &mksys);
232 ok(hres == S_OK, "IsSystemMoniker failed: %08x\n", hres);
233 ok(mksys == MKSYS_URLMONIKER, "mksys = %d\n", mksys);
234}
235
237{
238 switch(msg) {
239 case WM_PAINT: {
240 PAINTSTRUCT ps;
241 HBRUSH brush;
242 RECT rect;
243 HDC dc;
244
246
247 dc = BeginPaint(hwnd, &ps);
248 brush = CreateSolidBrush(RGB(255,0,0));
249 SelectObject(dc, brush);
250 Rectangle(dc, rect.left, rect.top, rect.right, rect.bottom);
251 DeleteObject(brush);
252 EndPaint(hwnd, &ps);
253 break;
254 }
255 }
256
258}
259
261{
262 static const WCHAR plugin_testW[] =
263 {'p','l','u','g','i','n',' ','t','e','s','t',0};
264 static WNDCLASSEXW wndclass = {
265 sizeof(WNDCLASSEXW),
266 0,
268 0, 0, NULL, NULL, NULL, NULL, NULL,
269 plugin_testW,
270 NULL
271 };
272
273 RegisterClassExW(&wndclass);
274 plugin_hwnd = CreateWindowW(plugin_testW, plugin_testW,
276 rect->right-rect->left, rect->bottom-rect->top, parent, NULL, NULL, NULL);
277}
278
280{
281 ok(0, "unexpected QI call %s\n", wine_dbgstr_guid(riid));
282 return E_NOINTERFACE;
283}
284
286{
287 return 2;
288}
289
291{
292 return 1;
293}
294
296{
297 ok(0, "unexpected call\n");
298 return E_NOTIMPL;
299}
300
303{
304 ok(0, "unexpected call\n");
305 return E_NOTIMPL;
306}
307
309{
310 DispActiveXTest *ax_test;
311 IDispatchEx *dispex;
313
314 CHECK_EXPECT(Advise);
315
316 hres = IUnknown_QueryInterface(pUnkSink, &IID_IDispatch, (void**)&sink_disp);
317 ok(hres == S_OK, "Could not get IDispatch iface: %08x\n", hres);
318
319 hres = IUnknown_QueryInterface(pUnkSink, &IID_IDispatchEx, (void**)&dispex);
320 ok(hres == E_NOINTERFACE, "QueryInterface(IID_IDispatchEx) returned: %08x\n", hres);
321
322 hres = IUnknown_QueryInterface(pUnkSink, &DIID_DispActiveXTest, (void**)&ax_test);
323 ok(hres == S_OK, "Could not get DispActiveXTest iface: %08x\n", hres);
324 DispActiveXTest_Release(ax_test);
325
326 *pdwCookie = 0xdeadbeef;
327 return S_OK;
328}
329
331{
332 CHECK_EXPECT(Unadvise);
333
334 ok(dwCookie == 0xdeadbeef, "dwCookie = %x\n", dwCookie);
335
336 if(sink_disp) {
337 IDispatch_Release(sink_disp);
338 sink_disp = NULL;
339 }
340
341 return S_OK;
342}
343
345{
346 ok(0, "unexpected call\n");
347 return E_NOTIMPL;
348}
349
350static const IConnectionPointVtbl ConnectionPointVtbl = {
359};
360
362
363static HRESULT ax_qi(REFIID,void**);
364
366{
367 return ax_qi(riid, ppv);
368}
369
371{
372 return ++activex_refcnt;
373}
374
376{
377 return --activex_refcnt;
378}
379
380static HRESULT WINAPI OleControl_GetControlInfo(IOleControl *iface, CONTROLINFO *pCI)
381{
382 ok(0, "unexpected call\n");
383 return E_NOTIMPL;
384}
385
387{
388 ok(0, "unexpected call\n");
389 return E_NOTIMPL;
390}
391
393{
394 switch(dispID) {
395 case DISPID_UNKNOWN:
396 CHECK_EXPECT2(OnAmbientPropertyChange_UNKNOWN);
397 break;
398 default:
399 ok(0, "unexpected call %d\n", dispID);
400 }
401
402 return S_OK;
403}
404
406{
407 if(bFreeze)
408 CHECK_EXPECT2(FreezeEvents_TRUE);
409 else
410 CHECK_EXPECT2(FreezeEvents_FALSE);
411 return S_OK;
412}
413
414static const IOleControlVtbl OleControlVtbl = {
422};
423
425
427{
428 return ax_qi(riid, ppv);
429}
430
432{
433 return ++activex_refcnt;
434}
435
437{
438 return --activex_refcnt;
439}
440
441static HRESULT WINAPI QuickActivate_QuickActivate(IQuickActivate *iface, QACONTAINER *container, QACONTROL *control)
442{
444
445 ok(container != NULL, "container == NULL\n");
446 ok(container->cbSize == sizeof(*container), "container->cbSize = %d\n", container->cbSize);
447 ok(container->pClientSite != NULL, "container->pClientSite == NULL\n");
448 ok(container->pAdviseSink != NULL, "container->pAdviseSink == NULL\n");
449 ok(container->pPropertyNotifySink != NULL, "container->pPropertyNotifySink == NULL\n");
450 ok(!container->pUnkEventSink, "container->pUnkEventSink != NULL\n");
451 ok(container->dwAmbientFlags == (QACONTAINER_SUPPORTSMNEMONICS|QACONTAINER_MESSAGEREFLECT|QACONTAINER_USERMODE),
452 "container->dwAmbientFlags = %x\n", container->dwAmbientFlags);
454 ok(!container->colorFore, "container->colorFore = %d\n", container->colorFore); /* FIXME */
456 ok(container->colorBack, "container->colorBack == 0\n"); /* FIXME */
458 todo_wine ok(container->pFont != NULL, "container->pFont == NULL\n");
459 else
460 ok(!container->pFont, "container->pFont = %p\n", container->pFont);
462 ok(container->pUndoMgr != NULL, "container->pUndoMgr == NULL\n");
463 ok(!container->dwAppearance, "container->dwAppearance = %x\n", container->dwAppearance);
465 ok(!container->lcid, "container->lcid = %x\n", container->lcid);
466 ok(!container->hpal, "container->hpal = %p\n", container->hpal);
467 ok(!container->pBindHost, "container->pBindHost != NULL\n");
468 ok(!container->pOleControlSite, "container->pOleControlSite != NULL\n");
469 ok(!container->pServiceProvider, "container->pServiceProvider != NULL\n");
470
471 ok(control->cbSize == sizeof(*control), "control->cbSize = %d\n", control->cbSize);
472 ok(!control->dwMiscStatus, "control->dwMiscStatus = %x\n", control->dwMiscStatus);
473 ok(!control->dwViewStatus, "control->dwViewStatus = %x\n", control->dwViewStatus);
474 ok(!control->dwEventCookie, "control->dwEventCookie = %x\n", control->dwEventCookie);
475 ok(!control->dwPropNotifyCookie, "control->dwPropNotifyCookie = %x\n", control->dwPropNotifyCookie);
476 ok(!control->dwPointerActivationPolicy, "control->dwPointerActivationPolicy = %x\n", control->dwPointerActivationPolicy);
477
478 ok(iface_cmp((IUnknown*)container->pClientSite, (IUnknown*)container->pAdviseSink),
479 "container->pClientSite != container->pAdviseSink\n");
480 ok(iface_cmp((IUnknown*)container->pClientSite, (IUnknown*)container->pPropertyNotifySink),
481 "container->pClientSite != container->pPropertyNotifySink\n");
483
484 IOleClientSite_AddRef(container->pClientSite);
485 client_site = container->pClientSite;
486
487 control->dwMiscStatus = OLEMISC_SETCLIENTSITEFIRST|OLEMISC_ACTIVATEWHENVISIBLE|OLEMISC_INSIDEOUT
488 |OLEMISC_CANTLINKINSIDE|OLEMISC_RECOMPOSEONRESIZE;
489 control->dwViewStatus = 0x18;
490 control->dwPropNotifyCookie = 1;
491
492 return S_OK;
493}
494
496{
497 ok(0, "unexpected call\n");
498 return E_NOTIMPL;
499}
500
502{
503 ok(0, "unexpected call\n");
504 return E_NOTIMPL;
505}
506
507static const IQuickActivateVtbl QuickActivateVtbl = {
514};
515
517
519{
520 return ax_qi(riid, ppv);
521}
522
524{
525 return ++activex_refcnt;
526}
527
529{
530 return --activex_refcnt;
531}
532
534{
535 ok(0, "unexpected call\n");
536 return E_NOTIMPL;
537}
538
540{
541 CHECK_EXPECT(IPersistPropertyBag_InitNew);
542 return S_OK;
543}
544
546{
547 IBindHost *bind_host, *bind_host2;
549 IMoniker *mon;
550 VARIANT v;
552
553 static const WCHAR param_nameW[] = {'p','a','r','a','m','_','n','a','m','e',0};
554 static const WCHAR num_paramW[] = {'n','u','m','_','p','a','r','a','m',0};
555 static const WCHAR no_paramW[] = {'n','o','_','p','a','r','a','m',0};
556 static WCHAR test_swfW[] = {'t','e','s','t','.','s','w','f',0};
557
558 static const IID *propbag_ifaces[] = {
560 &IID_IPropertyBag2,
561 NULL
562 };
563
564 CHECK_EXPECT(IPersistPropertyBag_Load);
565
566 ok(pPropBag != NULL, "pPropBag == NULL\n");
567 ok(!pErrorLog, "pErrorLog != NULL\n");
568
569 test_ifaces((IUnknown*)pPropBag, propbag_ifaces);
570
571 V_VT(&v) = VT_BSTR;
572 hres = IPropertyBag_Read(pPropBag, param_nameW, &v, NULL);
573 ok(hres == S_OK, "Read failed: %08x\n", hres);
574 ok(V_VT(&v) == VT_BSTR, "V_VT(&v) = %d\n", V_VT(&v));
575 ok(!strcmp_wa(V_BSTR(&v), "param_value"), "V_BSTR(v) = %s\n", wine_dbgstr_w(V_BSTR(&v)));
576
577 V_VT(&v) = VT_I4;
578 V_I4(&v) = 0xdeadbeef;
579 hres = IPropertyBag_Read(pPropBag, param_nameW, &v, NULL);
580 ok(hres == DISP_E_TYPEMISMATCH, "Read failed: %08x, expected DISP_E_TYPEMISMATCH\n", hres);
581 ok(V_VT(&v) == VT_I4, "V_VT(&v) = %d\n", V_VT(&v));
582 ok(V_I4(&v) == 0xdeadbeef, "V_I4(v) = %x\n", V_I4(&v));
583
584 V_VT(&v) = VT_BSTR;
585 hres = IPropertyBag_Read(pPropBag, num_paramW, &v, NULL);
586 ok(hres == S_OK, "Read failed: %08x\n", hres);
587 ok(V_VT(&v) == VT_BSTR, "V_VT(&v) = %d\n", V_VT(&v));
588 ok(!strcmp_wa(V_BSTR(&v), "3"), "V_BSTR(v) = %s\n", wine_dbgstr_w(V_BSTR(&v)));
590
591 V_VT(&v) = VT_I4;
592 V_I4(&v) = 0xdeadbeef;
593 hres = IPropertyBag_Read(pPropBag, num_paramW, &v, NULL);
594 ok(hres == S_OK, "Read failed: %08x\n", hres);
595 ok(V_VT(&v) == VT_I4, "V_VT(&v) = %d\n", V_VT(&v));
596 ok(V_I4(&v) == 3, "V_I4(v) = %x\n", V_I4(&v));
597
598 V_VT(&v) = VT_BSTR;
599 V_BSTR(&v) = (BSTR)0xdeadbeef;
600 hres = IPropertyBag_Read(pPropBag, no_paramW, &v, NULL);
601 ok(hres == E_INVALIDARG, "Read failed: %08x\n", hres);
602 ok(V_VT(&v) == VT_BSTR, "V_VT(&v) = %d\n", V_VT(&v));
603 ok(V_BSTR(&v) == (BSTR)0xdeadbeef, "V_BSTR(v) = %p\n", V_BSTR(&v));
604
605 set_plugin_readystate(READYSTATE_INTERACTIVE);
606
607 hres = IOleClientSite_QueryInterface(client_site, &IID_IBindHost, (void**)&bind_host);
608 ok(hres == S_OK, "Could not get IBindHost iface: %08x\n", hres);
609
610 hres = IOleClientSite_QueryInterface(client_site, &IID_IServiceProvider, (void**)&sp);
611 ok(hres == S_OK, "Could not get IServiceProvider iface: %08x\n", hres);
612
613 hres = IServiceProvider_QueryService(sp, &SID_SBindHost, &IID_IBindHost, (void**)&bind_host2);
614 ok(hres == S_OK, "QueryService(SID_SBindHost) failed: %08x\n", hres);
615 IServiceProvider_Release(sp);
616
617 ok(iface_cmp((IUnknown*)bind_host, (IUnknown*)bind_host2), "bind_host != bind_host2\n");
618 IBindHost_Release(bind_host2);
619
620 mon = NULL;
621 hres = IBindHost_CreateMoniker(bind_host, test_swfW, NULL, &mon, 0);
622 ok(hres == S_OK, "CreateMoniker failed: %08x\n", hres);
623 ok(mon != NULL, "mon == NULL\n");
624 test_mon_displayname(mon, "about:test.swf", "about:blanktest.swf");
625 IMoniker_Release(mon);
626
627 IBindHost_Release(bind_host);
628
629 mon = NULL;
630 hres = IOleClientSite_GetMoniker(client_site, OLEGETMONIKER_ONLYIFTHERE, OLEWHICHMK_CONTAINER, &mon);
631 ok(hres == S_OK, "GetMoniker failed: %08x\n", hres);
632 ok(mon != NULL, "mon == NULL\n");
633 test_mon_displayname(mon, "about:blank", NULL);
634 IMoniker_Release(mon);
635
636 set_plugin_readystate(READYSTATE_COMPLETE);
637
638 return S_OK;
639}
640
641static HRESULT WINAPI PersistPropertyBag_Save(IPersistPropertyBag *face, IPropertyBag *pPropBag, BOOL fClearDisrty, BOOL fSaveAllProperties)
642{
643 ok(0, "unexpected call\n");
644 return E_NOTIMPL;
645}
646
647static const IPersistPropertyBagVtbl PersistPropertyBagVtbl = {
655
656};
657
659
661{
662 return ax_qi(riid, ppv);
663}
664
666{
667 return ++activex_refcnt;
668}
669
671{
672 return --activex_refcnt;
673}
674
676{
677 ok(0, "unexpected call\n");
678 return E_NOTIMPL;
679}
680
682 ITypeInfo **ppTInfo)
683{
684 CHECK_EXPECT(GetTypeInfo);
685
686 ITypeInfo_AddRef(actxtest_typeinfo);
687 *ppTInfo = actxtest_typeinfo;
688 return S_OK;
689}
690
692 UINT cNames, LCID lcid, DISPID *rgDispId)
693{
694 ok(IsEqualGUID(riid, &IID_NULL), "riid = %s\n", wine_dbgstr_guid(riid));
695 ok(cNames == 1, "cNames = %d\n", cNames);
696 ok(rgszNames != NULL, "rgszNames == NULL\n");
697 ok(rgDispId != NULL, "rgDispId == NULL\n");
698
699 if(!strcmp_wa(rgszNames[0], "scriptprop")) {
700 CHECK_EXPECT(GetIDsOfNames_scriptprop);
701 *rgDispId = DISPID_SCRIPTPROP;
702 }else if(!strcmp_wa(rgszNames[0], "scriptCall")) {
703 *rgDispId = DISPID_SCRIPTCALL;
704 }else {
705 ok(0, "rgszNames[0] = %s\n", wine_dbgstr_w(rgszNames[0]));
706 }
707
708 return S_OK;
709}
710
712 LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult,
713 EXCEPINFO *pExcepInfo, UINT *puArgErr)
714{
715 ok(IsEqualGUID(riid, &IID_NULL), "riid = %s\n", wine_dbgstr_guid(riid));
716 ok(pDispParams != NULL, "pDispParams == NULL\n");
717 ok(!pDispParams->cNamedArgs, "pDispParams->cNamedArgs = %d\n", pDispParams->cNamedArgs);
718 ok(!pDispParams->rgdispidNamedArgs, "pDispParams->rgdispidNamedArgs != NULL\n");
719
720 switch(dispIdMember) {
722 CHECK_EXPECT2(Invoke_READYSTATE);
723 ok(wFlags == DISPATCH_PROPERTYGET, "wFlags = %x\n", wFlags);
724 ok(!pDispParams->cArgs, "pDispParams->cArgs = %d\n", pDispParams->cArgs);
725 ok(!pDispParams->rgvarg, "pDispParams->rgvarg != NULL\n");
726 ok(!pExcepInfo, "pExcepInfo != NULL\n");
727 ok(puArgErr != NULL, "puArgErr == NULL\n");
728 ok(pVarResult != NULL, "pVarResult == NULL\n");
729
730 V_VT(pVarResult) = VT_I4;
731 V_I4(pVarResult) = plugin_readystate;
732 return S_OK;
733 case DISPID_ENABLED:
734 CHECK_EXPECT2(Invoke_ENABLED);
735 ok(wFlags == DISPATCH_PROPERTYGET, "wFlags = %x\n", wFlags);
736 ok(!pDispParams->cArgs, "pDispParams->cArgs = %d\n", pDispParams->cArgs);
737 ok(!pDispParams->rgvarg, "pDispParams->rgvarg != NULL\n");
738 ok(!pExcepInfo, "pExcepInfo != NULL\n");
739 ok(puArgErr != NULL, "puArgErr == NULL\n");
740 ok(pVarResult != NULL, "pVarResult == NULL\n");
742 case DISPID_VALID:
743 CHECK_EXPECT(Invoke_VALID);
744 ok(wFlags == DISPATCH_PROPERTYGET, "wFlags = %x\n", wFlags);
745 ok(!pDispParams->cArgs, "pDispParams->cArgs = %d\n", pDispParams->cArgs);
746 ok(!pDispParams->rgvarg, "pDispParams->rgvarg != NULL\n");
747 ok(!pExcepInfo, "pExcepInfo != NULL\n");
748 ok(puArgErr != NULL, "puArgErr == NULL\n");
749 ok(pVarResult != NULL, "pVarResult == NULL\n");
752 CHECK_EXPECT(Invoke_SECURITYCTX);
753 ok(wFlags == DISPATCH_PROPERTYGET, "wFlags = %x\n", wFlags);
754 ok(!pDispParams->cArgs, "pDispParams->cArgs = %d\n", pDispParams->cArgs);
755 ok(!pDispParams->rgvarg, "pDispParams->rgvarg != NULL\n");
756 ok(!pExcepInfo, "pExcepInfo != NULL\n");
757 ok(puArgErr != NULL, "puArgErr == NULL\n");
758 ok(pVarResult != NULL, "pVarResult == NULL\n");
761 CHECK_EXPECT(Invoke_SCRIPTPROP);
762 ok(wFlags == DISPATCH_PROPERTYGET, "wFlags = %x\n", wFlags);
763 ok(!pDispParams->cArgs, "pDispParams->cArgs = %d\n", pDispParams->cArgs);
764 ok(!pDispParams->rgvarg, "pDispParams->rgvarg != NULL\n");
765 ok(pExcepInfo != NULL, "pExcepInfo == NULL\n");
766 ok(!puArgErr, "puArgErr != NULL\n");
767 ok(pVarResult != NULL, "pVarResult == NULL\n");
768
769 V_VT(pVarResult) = VT_I4;
770 V_I4(pVarResult) = 4;
771 return S_OK;
773 CHECK_EXPECT(Invoke_SCRIPTCALL);
774 ok(wFlags == DISPATCH_METHOD, "wFlags = %x\n", wFlags);
775 ok(!pDispParams->cArgs, "pDispParams->cArgs = %d\n", pDispParams->cArgs);
776 ok(pExcepInfo != NULL, "pExcepInfo == NULL\n");
777 ok(!puArgErr, "puArgErr != NULL\n");
778 ok(!pVarResult, "pVarResult != NULL\n");
779 /*
780 V_VT(pVarResult) = VT_I4;
781 V_I4(pVarResult) = 4;
782 */
783 return S_OK;
784 default:
785 ok(0, "unexpected call %d\n", dispIdMember);
786 }
787
788 return E_NOTIMPL;
789}
790
791static const IDispatchVtbl DispatchVtbl = {
799};
800
802
804{
805 return ax_qi(riid, ppv);
806}
807
809{
810 return ++activex_refcnt;
811}
812
814{
815 return --activex_refcnt;
816}
817
819{
821
822 ITypeInfo_AddRef(class_typeinfo);
823 *ppTI = class_typeinfo;
824 return S_OK;
825}
826
827static const IProvideClassInfoVtbl ProvideClassInfoVtbl = {
832};
833
835
837{
838 return ax_qi(riid, ppv);
839}
840
842{
843 return ++activex_refcnt;
844}
845
847{
848 return --activex_refcnt;
849}
850
852 IEnumConnectionPoints **ppEnum)
853{
854 ok(0, "unexpected call\n");
855 return E_NOTIMPL;
856}
857
860{
862 /* TODO */
863 trace("FindConnectionPoint(IID_IPropertyNotifySink)\n");
865 }
866
867 CHECK_EXPECT(FindConnectionPoint);
868 ok(IsEqualGUID(riid, &DIID_DispActiveXTest), "riid = %s\n", wine_dbgstr_guid(riid));
869
870 IConnectionPoint_AddRef(&ConnectionPoint);
871 *ppCP = &ConnectionPoint;
872 return S_OK;
873}
874
875static const IConnectionPointContainerVtbl ConnectionPointContainerVtbl = {
881};
882
884
886{
887 return ax_qi(riid, ppv);
888}
889
891{
892 return ++activex_refcnt;
893}
894
896{
897 return --activex_refcnt;
898}
899
900static HRESULT WINAPI ViewObjectEx_Draw(IViewObjectEx *iface, DWORD dwDrawAspect, LONG lindex, void *pvAspect, DVTARGETDEVICE *ptd,
901 HDC hdcTargetDev, HDC hdcDraw, LPCRECTL lprcBounds, LPCRECTL lprcWBoungs, BOOL (WINAPI*pfnContinue)(ULONG_PTR), ULONG_PTR dwContinue)
902{
903 ok(0, "unexpected call\n");
904 return E_NOTIMPL;
905}
906
907static HRESULT WINAPI ViewObjectEx_GetColorSet(IViewObjectEx *iface, DWORD dwDrawAspect, LONG lindex, void *pvAspect, DVTARGETDEVICE *ptd,
908 HDC hicTargetDev, LOGPALETTE **ppColorSet)
909{
910 ok(0, "unexpected call\n");
911 return E_NOTIMPL;
912}
913
914static HRESULT WINAPI ViewObjectEx_Freeze(IViewObjectEx *iface, DWORD dwDrawAspect, LONG lindex, void *pvAspect, DWORD *pdwFreeze)
915{
916 ok(0, "unexpected call\n");
917 return E_NOTIMPL;
918}
919
921{
922 ok(0, "unexpected call\n");
923 return E_NOTIMPL;
924}
925
927{
928 CHECK_EXPECT(SetAdvise);
929
930 ok(aspects == DVASPECT_CONTENT, "aspects = %x\n", aspects);
931 ok(!advf, "advf = %x\n", advf);
932 ok(pAdvSink != NULL, "pAdvSink = NULL\n");
933
934 return S_OK;
935}
936
937static HRESULT WINAPI ViewObjectEx_GetAdvise(IViewObjectEx *iface, DWORD *pAspects, DWORD *pAdvf, IAdviseSink **ppAdvSink)
938{
939 ok(0, "unexpected call\n");
940 return E_NOTIMPL;
941}
942
943static HRESULT WINAPI ViewObjectEx_GetExtent(IViewObjectEx *iface, DWORD dwDrawAspect, LONG lindex, DVTARGETDEVICE *ptd, LPSIZEL lpsizel)
944{
945 ok(0, "unexpected call\n");
946 return E_NOTIMPL;
947}
948
950{
951 ok(0, "unexpected call\n");
952 return E_NOTIMPL;
953}
954
956{
957 CHECK_EXPECT(GetViewStatus);
958
959 *pdwStatus = VIEWSTATUS_OPAQUE|VIEWSTATUS_SOLIDBKGND;
960 return S_OK;
961}
962
963static HRESULT WINAPI ViewObjectEx_QueryHitPoint(IViewObjectEx *iface, DWORD dwAspect, LPCRECT pRectBounds, POINT ptlLoc,
964 LONG lCloseHint, DWORD *pHitResult)
965{
966 trace("QueryHitPoint call ignored\n");
967 return E_NOTIMPL;
968}
969
970static HRESULT WINAPI ViewObjectEx_QueryHitRect(IViewObjectEx *iface, DWORD dwAspect, LPCRECT pRectBounds, LPCRECT pRectLoc,
971 LONG lCloseHint, DWORD *pHitResult)
972{
973 ok(0, "unexpected call\n");
974 return E_NOTIMPL;
975}
976
977static HRESULT WINAPI ViewObjectEx_GetNaturalExtent(IViewObjectEx *iface, DWORD dwAspect, LONG lindex, DVTARGETDEVICE *ptd,
978 HDC hicTargetDev, DVEXTENTINFO *pExtentIngo, LPSIZEL pSizel)
979{
980 ok(0, "unexpected call\n");
981 return E_NOTIMPL;
982}
983
984static const IViewObjectExVtbl ViewObjectExVtbl = {
1000};
1001
1003
1005{
1006 return ax_qi(riid, ppv);
1007}
1008
1010{
1011 return ++activex_refcnt;
1012}
1013
1015{
1016 return --activex_refcnt;
1017}
1018
1020{
1021 if(!pClientSite) {
1022 CHECK_EXPECT(SetClientSite_NULL);
1023 return S_OK;
1024 }
1025
1026 CHECK_EXPECT(SetClientSite);
1027
1028 IOleClientSite_AddRef(pClientSite);
1029 client_site = pClientSite;
1030 return S_OK;
1031}
1032
1034{
1035 ok(0, "unexpected call\n");
1036 return E_NOTIMPL;
1037}
1038
1039static HRESULT WINAPI OleObject_SetHostNames(IOleObject *iface, LPCOLESTR szContainerApp, LPCOLESTR szContainerObj)
1040{
1041 ok(0, "unexpected call\n");
1042 return E_NOTIMPL;
1043}
1044
1045static HRESULT WINAPI OleObject_Close(IOleObject *iface, DWORD dwSaveOption)
1046{
1048
1049 ok(dwSaveOption == OLECLOSE_NOSAVE, "dwSaveOption = %d\n", dwSaveOption);
1050 return S_OK;
1051}
1052
1053static HRESULT WINAPI OleObject_SetMoniker(IOleObject *iface, DWORD dwWhichMoniker, IMoniker *pmk)
1054{
1055 ok(0, "unexpected call\n");
1056 return E_NOTIMPL;
1057}
1058
1059static HRESULT WINAPI OleObject_GetMoniker(IOleObject *iface, DWORD dwAssign, DWORD dwWhichMoniker, IMoniker **ppmk)
1060{
1061 ok(0, "unexpected call\n");
1062 return E_NOTIMPL;
1063}
1064
1065static HRESULT WINAPI OleObject_InitFromData(IOleObject *iface, IDataObject *pDataObject, BOOL fCreation,
1067{
1068 ok(0, "unexpected call\n");
1069 return E_NOTIMPL;
1070}
1071
1073{
1074 ok(0, "unexpected call\n");
1075 return E_NOTIMPL;
1076}
1077
1078static HRESULT WINAPI OleObject_DoVerb(IOleObject *iface, LONG iVerb, LPMSG lpmsg, IOleClientSite *pActiveSite,
1079 LONG lindex, HWND hwndParent, LPCRECT lprcPosRect)
1080{
1081 OLEINPLACEFRAMEINFO frame_info = {0xdeadbeef};
1082 IOleInPlaceUIWindow *ip_uiwindow;
1083 IOleInPlaceFrame *ip_frame;
1084 IOleInPlaceSiteEx *ip_site;
1085 RECT pos_rect, clip_rect;
1086 BOOL no_redraw;
1087 HWND hwnd;
1088 HRESULT hres;
1089
1090 CHECK_EXPECT(DoVerb);
1091
1092 ok(iVerb == OLEIVERB_INPLACEACTIVATE, "iVerb = %d\n", iVerb);
1093 ok(!lpmsg, "lpmsg != NULL\n");
1094 ok(pActiveSite != NULL, "pActiveSite == NULL\n");
1095 ok(!lindex, "lindex = %d\n", lindex);
1096 ok(hwndParent != NULL, "hwndParent == NULL\n");
1097 ok(lprcPosRect != NULL, "lprcPosRect == NULL\n");
1098
1099 hres = IOleClientSite_QueryInterface(pActiveSite, &IID_IOleInPlaceSiteEx, (void**)&ip_site);
1100 ok(hres == S_OK, "Could not get IOleInPlaceSiteEx iface: %08x\n", hres);
1101
1102 hres = IOleInPlaceSiteEx_CanInPlaceActivate(ip_site);
1103 ok(hres == S_OK, "CanInPlaceActivate failed: %08x\n", hres);
1104
1105 SET_EXPECT(InPlaceObject_GetWindow);
1106 no_redraw = 0xdeadbeef;
1107 hres = IOleInPlaceSiteEx_OnInPlaceActivateEx(ip_site, &no_redraw, 0);
1108 ok(hres == S_OK, "InPlaceActivateEx failed: %08x\n", hres);
1109 ok(!no_redraw, "no_redraw = %x\n", no_redraw);
1110 CHECK_CALLED(InPlaceObject_GetWindow);
1111
1112 no_redraw = 0xdeadbeef;
1113 hres = IOleInPlaceSiteEx_OnInPlaceActivateEx(ip_site, &no_redraw, 0);
1114 ok(hres == S_OK, "InPlaceActivateEx failed: %08x\n", hres);
1115 ok(no_redraw == 0xdeadbeef, "no_redraw = %x\n", no_redraw);
1116
1117 hwnd = NULL;
1118 hres = IOleInPlaceSiteEx_GetWindow(ip_site, &hwnd);
1119 ok(hres == S_OK, "GetWindow failed: %08x\n", hres);
1120 ok(hwnd != NULL, "hwnd == NULL\n");
1121 ok(hwnd == hwndParent, "hwnd != hwndParent\n");
1122
1123 create_plugin_window(hwnd, lprcPosRect);
1124
1125 ip_frame = NULL;
1126 ip_uiwindow = NULL;
1127 frame_info.cb = sizeof(OLEINPLACEFRAMEINFO);
1128 hres = IOleInPlaceSiteEx_GetWindowContext(ip_site, &ip_frame, &ip_uiwindow, &pos_rect, &clip_rect, &frame_info);
1129 ok(hres == S_OK, "GetWindowContext failed: %08x\n", hres);
1130 ok(ip_frame != NULL, "ip_frame == NULL\n");
1131 ok(ip_uiwindow != NULL, "ip_uiwindow == NULL\n");
1132 ok((IOleInPlaceUIWindow*)ip_frame != ip_uiwindow, "ip_frame == ip_uiwindow\n");
1133 ok(!memcmp(&pos_rect, lprcPosRect, sizeof(RECT)), "pos_rect != lpecPosRect\n");
1134 ok(!memcmp(&clip_rect, lprcPosRect, sizeof(RECT)), "clip_rect != lpecPosRect\n");
1135 ok(frame_info.cb == sizeof(frame_info), "frame_info.cb = %d\n", frame_info.cb);
1136 ok(!frame_info.fMDIApp, "frame_info.fMDIApp = %x\n", frame_info.fMDIApp);
1137 ok(frame_info.hwndFrame != NULL, "frame_info.hwnd == NULL\n");
1138 ok(frame_info.hwndFrame == container_hwnd, "frame_info.hwnd != container_hwnd\n");
1139 ok(!frame_info.haccel, "frame_info.haccel != 0\n");
1140 ok(!frame_info.cAccelEntries, "frame_info.cAccelEntried != 0\n");
1141
1142 IOleInPlaceFrame_Release(ip_frame);
1143 IOleInPlaceUIWindow_Release(ip_uiwindow);
1144
1145
1146 IOleInPlaceSiteEx_Release(ip_site);
1147
1148 hres = IOleClientSite_ShowObject(client_site);
1149 ok(hres == S_OK, "ShowObject failed: %08x\n", hres);
1150
1151 SET_EXPECT(InPlaceObject_GetWindow);
1152 SET_EXPECT(SetObjectRects);
1153
1154 return S_OK;
1155}
1156
1158{
1159 ok(0, "unexpected call\n");
1160 return E_NOTIMPL;
1161}
1162
1164{
1165 ok(0, "unexpected call\n");
1166 return E_NOTIMPL;
1167}
1168
1170{
1171 ok(0, "unexpected call\n");
1172 return E_NOTIMPL;
1173}
1174
1176{
1177 ok(0, "unexpected call\n");
1178 return E_NOTIMPL;
1179}
1180
1181static HRESULT WINAPI OleObject_GetUserType(IOleObject *iface, DWORD dwFormOfType, LPOLESTR *pszUserType)
1182{
1183 ok(0, "unexpected call\n");
1184 return E_NOTIMPL;
1185}
1186
1187static HRESULT WINAPI OleObject_SetExtent(IOleObject *iface, DWORD dwDrawAspect, SIZEL *psizel)
1188{
1189 CHECK_EXPECT(SetExtent);
1190 return E_NOTIMPL;
1191}
1192
1193static HRESULT WINAPI OleObject_GetExtent(IOleObject *iface, DWORD dwDrawAspect, SIZEL *psizel)
1194{
1195 CHECK_EXPECT(GetExtent);
1196 return E_NOTIMPL;
1197}
1198
1199static HRESULT WINAPI OleObject_Advise(IOleObject *iface, IAdviseSink *pAdvSink, DWORD *pdwConnection)
1200{
1201 ok(0, "unexpected call\n");
1202 return E_NOTIMPL;
1203}
1204
1206{
1207 ok(0, "unexpected call\n");
1208 return E_NOTIMPL;
1209}
1210
1212{
1213 ok(0, "unexpected call\n");
1214 return E_NOTIMPL;
1215}
1216
1217static HRESULT WINAPI OleObject_GetMiscStatus(IOleObject *iface, DWORD dwAspect, DWORD *pdwStatus)
1218{
1219 CHECK_EXPECT(GetMiscStatus);
1220 ok(dwAspect == DVASPECT_CONTENT, "dwAspect = %d\n", dwAspect);
1221 ok(pdwStatus != NULL, "pdwStatus == NULL\n");
1222 *pdwStatus = OLEMISC_SETCLIENTSITEFIRST|OLEMISC_ACTIVATEWHENVISIBLE
1223 |OLEMISC_INSIDEOUT|OLEMISC_CANTLINKINSIDE|OLEMISC_RECOMPOSEONRESIZE;
1224 return S_OK;
1225}
1226
1228{
1229 ok(0, "unexpected call\n");
1230 return E_NOTIMPL;
1231}
1232
1233static const IOleObjectVtbl OleObjectVtbl = {
1258};
1259
1261
1263 REFIID riid, void **ppv)
1264{
1265 return ax_qi(riid, ppv);
1266}
1267
1269{
1270 return ++activex_refcnt;
1271}
1272
1274{
1275 return --activex_refcnt;
1276}
1277
1279 HWND *phwnd)
1280{
1281 CHECK_EXPECT2(InPlaceObject_GetWindow);
1282
1283 ok(phwnd != NULL, "phwnd == NULL\n");
1284
1285 *phwnd = plugin_hwnd;
1286 return *phwnd ? S_OK : E_UNEXPECTED;
1287}
1288
1290 BOOL fEnterMode)
1291{
1292 ok(0, "unexpected call\n");
1293 return E_NOTIMPL;
1294}
1295
1297{
1298 IOleInPlaceSite *ip_site;
1299 HRESULT hres;
1300
1301 CHECK_EXPECT(InPlaceDeactivate);
1302
1303 hres = IOleClientSite_QueryInterface(client_site, &IID_IOleInPlaceSite, (void**)&ip_site);
1304 ok(hres == S_OK, "Could not get IOleInPlaceSite iface: %08x\n", hres);
1305
1306 hres = IOleInPlaceSite_OnInPlaceDeactivate(ip_site);
1307 ok(hres == S_OK, "OnInPlaceDeactivate failed: %08x\n", hres);
1308
1309 IOleInPlaceSite_Release(ip_site);
1310 return S_OK;
1311}
1312
1314{
1315 CHECK_EXPECT2(UIDeactivate);
1316 return S_OK;
1317}
1318
1320 LPCRECT lprcPosRect, LPCRECT lprcClipRect)
1321{
1322 CHECK_EXPECT2(SetObjectRects);
1323 return S_OK;
1324}
1325
1327{
1328 ok(0, "unexpected call\n");
1329 return E_NOTIMPL;
1330}
1331
1333 UINT msg, WPARAM wParam, LPARAM lParam, LRESULT *lpResult)
1334{
1335 ok(0, "unexpected call\n");
1336 return E_NOTIMPL;
1337}
1338
1340 IDropTarget **ppDropTarget)
1341{
1342 ok(0, "unexpected call\n");
1343 return E_NOTIMPL;
1344}
1345
1346static const IOleInPlaceObjectWindowlessVtbl OleInPlaceObjectWindowlessVtbl = {
1358};
1359
1361
1362static void *wrapped_iface_vtbl[100];
1363static IUnknown wrapped_iface = { (IUnknownVtbl*)wrapped_iface_vtbl };
1364
1366{
1367 ok(0, "unexpected wrapped_QueryInterface call\n");
1368 *ppv = NULL;
1369 return E_NOINTERFACE;
1370}
1371
1373{
1375 return 2;
1376}
1377
1379{
1381 return 1;
1382}
1383
1384static HRESULT WINAPI wrapped_func_nocall(IUnknown *iface, int i, double d)
1385{
1386 ok(0, "unexpected call\n");
1387 return E_FAIL;
1388}
1389
1390static HRESULT WINAPI wrapped_func(IUnknown *iface, int i, double d)
1391{
1393 ok(iface == &wrapped_iface, "iface != wrapped_iface\n");
1394 ok(i == 10, "i = %d\n", i);
1395 ok(d == 32.0, "d = %lf\n", d);
1396 return S_OK;
1397}
1398
1399static void init_wrapped_iface(void)
1400{
1401 unsigned i;
1402
1406
1407 for(i=3; i<100; i++)
1409
1411}
1412
1413static HRESULT ax_qi(REFIID riid, void **ppv)
1414{
1417 }else if(IsEqualGUID(riid, &IID_IQuickActivate)) {
1421 }else if(IsEqualGUID(riid, &IID_IDispatch)) {
1422 *ppv = &Dispatch;
1428 || IsEqualGUID(riid, &IID_IViewObjectEx)) {
1430 }else if(IsEqualGUID(riid, &IID_IOleObject)) {
1432 }else if(IsEqualGUID(riid, &IID_ITestActiveX)) {
1433 CHECK_EXPECT(QI_ITestActiveX);
1434 *ppv = &wrapped_iface;
1435 return S_OK;
1437 || IsEqualGUID(&IID_IOleInPlaceObjectWindowless, riid)) {
1439 }else {
1440 trace("QI %s\n", wine_dbgstr_guid(riid));
1441 *ppv = NULL;
1442 }
1443
1444 if(!*ppv)
1445 return E_NOINTERFACE;
1446
1447 IUnknown_AddRef((IUnknown*)*ppv);
1448 return S_OK;
1449}
1450
1452{
1453 *ppv = NULL;
1454
1456 *ppv = iface;
1457 return S_OK;
1458 }
1459
1460 if(IsEqualGUID(&IID_IMarshal, riid))
1461 return E_NOINTERFACE;
1463 return E_NOINTERFACE;
1464 if(IsEqualGUID(&IID_IClassFactoryEx, riid))
1465 return E_NOINTERFACE; /* TODO */
1466
1467 ok(0, "unexpected riid %s\n", wine_dbgstr_guid(riid));
1468 return E_NOTIMPL;
1469}
1470
1472{
1473 return 2;
1474}
1475
1477{
1478 return 1;
1479}
1480
1482{
1483 CHECK_EXPECT(CreateInstance);
1484
1485 ok(!outer, "outer = %p\n", outer);
1486 ok(IsEqualGUID(riid, &IID_IUnknown), "riid = %s\n", wine_dbgstr_guid(riid));
1487
1489 *ppv = &OleControl;
1490 return S_OK;
1491}
1492
1494{
1495 ok(0, "unexpected call\n");
1496 return S_OK;
1497}
1498
1499static const IClassFactoryVtbl ClassFactoryVtbl = {
1505};
1506
1508
1509static void test_elem_dispex(IDispatchEx *dispex)
1510{
1511 DISPPARAMS dp;
1512 EXCEPINFO ei;
1513 VARIANT v;
1514 DISPID id;
1515 BSTR str;
1516 HRESULT hres;
1517
1518 str = a2bstr("scriptprop");
1519 SET_EXPECT(GetIDsOfNames_scriptprop);
1520 hres = IDispatchEx_GetDispID(dispex, str, 0, &id);
1521 CHECK_CALLED(GetIDsOfNames_scriptprop);
1523 ok(hres == S_OK, "GetDispID failed: %08x\n", hres);
1524 todo_wine
1525 ok(id == DISPID_SCRIPTPROP, "id = %d\n", id);
1526
1527 SET_EXPECT(Invoke_SECURITYCTX);
1528 SET_EXPECT(Invoke_SCRIPTPROP);
1529 memset(&dp, 0, sizeof(dp));
1530 memset(&ei, 0, sizeof(ei));
1531 V_VT(&v) = VT_EMPTY;
1532 hres = IDispatchEx_InvokeEx(dispex, id, LOCALE_NEUTRAL, DISPATCH_PROPERTYGET, &dp, &v, &ei, NULL);
1533 ok(hres == S_OK, "InvokeEx failed: %08x\n", hres);
1534 ok(V_VT(&v) == VT_I4, "V_VT(v) = %d\n", V_VT(&v));
1535 ok(V_I4(&v) == 4, "V_I4(v) = %d\n", V_I4(&v));
1536 CHECK_CALLED(Invoke_SECURITYCTX);
1537 CHECK_CALLED(Invoke_SCRIPTPROP);
1538}
1539
1540static void test_iface_wrapping(IHTMLObjectElement *elem)
1541{
1542 IHTMLObjectElement *elem2;
1543 IUnknown *unk, *unk2;
1544 ULONG ref;
1545 void **vtbl;
1546 HRESULT hres;
1547
1548 SET_EXPECT(QI_ITestActiveX);
1551 unk = (void*)0xdeadbeef;
1552 hres = IHTMLObjectElement_QueryInterface(elem, &IID_ITestActiveX, (void**)&unk);
1553 ok(hres == S_OK, "QueryInerface(IID_ITestActiveX failed: %08x\n", hres);
1554 CHECK_CALLED(QI_ITestActiveX);
1557
1558 /* See dlls/mshtml/ifacewrap.c */
1559 ok(unk != &wrapped_iface, "Unexpected unk %p, expected %p (%p, %p)\n", unk, &ViewObjectEx, unk->lpVtbl, &ViewObjectExVtbl);
1560 ok(unk->lpVtbl != wrapped_iface.lpVtbl, "unk->lpVtbl == wrapped_iface->lpVtbl\n");
1561 ok(unk->lpVtbl->QueryInterface != wrapped_QueryInterface, "QueryInterface not wrapped\n");
1562 ok(unk->lpVtbl->AddRef != wrapped_AddRef, "AddRef not wrapped\n");
1563 ok(unk->lpVtbl->Release != wrapped_Release, "Release not wrapped\n");
1564
1565 vtbl = (void**)unk->lpVtbl;
1566 ok(vtbl[4] != wrapped_func_nocall, "func not wrapped\n");
1567 ok(vtbl[63] != wrapped_func, "func not wrapped\n");
1568
1570 hres = ((HRESULT (WINAPI*)(IUnknown*,int,double))vtbl[63])(unk, 10, 32.0);
1571 ok(hres == S_OK, "wrapped_func returned %08x\n", hres);
1573
1574 hres = IUnknown_QueryInterface(unk, &IID_IHTMLObjectElement, (void**)&elem2);
1575 ok(hres == S_OK, "Could not get IHTMLObjectElement from wrapped iface: %08x\n", hres);
1576 ok(iface_cmp((IUnknown*)elem2, (IUnknown*)elem), "elem2 != elem\n");
1577 IHTMLObjectElement_Release(elem2);
1578
1580 ref = IUnknown_Release(unk);
1581 ok(!ref, "ref=%d\n", ref);
1583
1584 SET_EXPECT(QI_ITestActiveX);
1587 unk = (void*)0xdeadbeef;
1588 hres = IHTMLObjectElement_QueryInterface(elem, &IID_ITestActiveX, (void**)&unk2);
1589 ok(hres == S_OK, "QueryInerface(IID_ITestActiveX failed: %08x\n", hres);
1590 CHECK_CALLED(QI_ITestActiveX);
1593
1594 ok(unk != unk2, "unk == unk2\n");
1595
1597 ref = IUnknown_Release(unk2);
1598 ok(!ref, "ref=%d\n", ref);
1600}
1601
1602static void test_object_elem(IHTMLDocument2 *doc)
1603{
1604 IHTMLObjectElement *objelem;
1605 IHTMLDocument3 *doc3;
1606 IDispatchEx *dispex;
1607 IHTMLElement *elem;
1608 IDispatch *disp;
1609 VARIANT v;
1610 BSTR str;
1611 HRESULT hres;
1612
1613 hres = IHTMLDocument2_QueryInterface(doc, &IID_IHTMLDocument3, (void**)&doc3);
1614 ok(hres == S_OK, "Could not get IHTMLDocument3 iface: %08x\n", hres);
1615
1616 str = a2bstr("objid");
1617 elem = (void*)0xdeadbeef;
1618 hres = IHTMLDocument3_getElementById(doc3, str, &elem);
1619 IHTMLDocument3_Release(doc3);
1621 ok(hres == S_OK, "getElementById failed: %08x\n", hres);
1622 ok(elem != NULL, "elem == NULL\n");
1623
1624 hres = IHTMLElement_QueryInterface(elem, &IID_IHTMLObjectElement, (void**)&objelem);
1625 IHTMLElement_Release(elem);
1626 ok(hres == S_OK, "Could not get IHTMLObjectElement iface: %08x\n", hres);
1627
1628 SET_EXPECT(Invoke_SECURITYCTX);
1629 hres = IHTMLObjectElement_get_object(objelem, &disp);
1630 ok(hres == S_OK, "get_object failed: %08x\n", hres);
1631 ok(disp == &Dispatch, "disp != Dispatch\n");
1632 CHECK_CALLED(Invoke_SECURITYCTX);
1633
1634 hres = IHTMLObjectElement_QueryInterface(objelem, &IID_IDispatchEx, (void**)&dispex);
1635 ok(hres == S_OK, "QueryInterface failed: %08x\n", hres);
1636 test_elem_dispex(dispex);
1637 IDispatchEx_Release(dispex);
1638
1639 test_iface_wrapping(objelem);
1640
1641 hres = IHTMLObjectElement_get_width(objelem, &v);
1642 ok(hres == S_OK, "get_width failed: %08x\n", hres);
1643 ok(V_VT(&v) == VT_BSTR, "V_VT(width) = %d\n", V_VT(&v));
1644 ok(!strcmp_wa(V_BSTR(&v), "300"), "V_BSTR(width) = %s\n", wine_dbgstr_w(V_BSTR(&v)));
1645 VariantClear(&v);
1646
1647 hres = IHTMLObjectElement_get_height(objelem, &v);
1648 ok(hres == S_OK, "get_height failed: %08x\n", hres);
1649 ok(V_VT(&v) == VT_BSTR, "V_VT(height) = %d\n", V_VT(&v));
1650 ok(!strcmp_wa(V_BSTR(&v), "200"), "V_BSTR(height) = %s\n", wine_dbgstr_w(V_BSTR(&v)));
1651 VariantClear(&v);
1652
1653 V_VT(&v) = VT_I4;
1654 V_I4(&v) = 400;
1655 SET_EXPECT(OnAmbientPropertyChange_UNKNOWN);
1656 SET_EXPECT(Invoke_ENABLED);
1657 hres = IHTMLObjectElement_put_width(objelem, v);
1658 ok(hres == S_OK, "put_width failed: %08x\n", hres);
1659 CHECK_CALLED(OnAmbientPropertyChange_UNKNOWN);
1660 CLEAR_CALLED(Invoke_ENABLED); /* Not called on IE10 */
1661
1662 hres = IHTMLObjectElement_get_width(objelem, &v);
1663 ok(hres == S_OK, "get_width failed: %08x\n", hres);
1664 ok(V_VT(&v) == VT_BSTR, "V_VT(width) = %d\n", V_VT(&v));
1665 ok(!strcmp_wa(V_BSTR(&v), "400"), "V_BSTR(width) = %s\n", wine_dbgstr_w(V_BSTR(&v)));
1666 VariantClear(&v);
1667
1668 V_VT(&v) = VT_I4;
1669 V_I4(&v) = 250;
1670 SET_EXPECT(OnAmbientPropertyChange_UNKNOWN);
1671 SET_EXPECT(Invoke_ENABLED);
1672 hres = IHTMLObjectElement_put_height(objelem, v);
1673 ok(hres == S_OK, "put_height failed: %08x\n", hres);
1674 CHECK_CALLED(OnAmbientPropertyChange_UNKNOWN);
1675 CLEAR_CALLED(Invoke_ENABLED); /* Not called on IE10 */
1676
1677 hres = IHTMLObjectElement_get_height(objelem, &v);
1678 ok(hres == S_OK, "get_height failed: %08x\n", hres);
1679 ok(V_VT(&v) == VT_BSTR, "V_VT(height) = %d\n", V_VT(&v));
1680 ok(!strcmp_wa(V_BSTR(&v), "250"), "V_BSTR(height) = %s\n", wine_dbgstr_w(V_BSTR(&v)));
1681 VariantClear(&v);
1682
1683 IHTMLObjectElement_Release(objelem);
1684}
1685
1686static void test_container(IHTMLDocument2 *doc_obj)
1687{
1688 IHTMLWindow2 *parent_window, *html_window;
1689 IServiceProvider *serv_prov;
1691 IHTMLDocument2 *doc;
1692 IUnknown *unk;
1693 HRESULT hres;
1694
1695 container = NULL;
1696 hres = IOleClientSite_GetContainer(client_site, &container);
1697 ok(hres == S_OK, "GetContainer failed: %08x\n", hres);
1698 ok(container != NULL, "container == NULL\n");
1699
1700 hres = IHTMLDocument2_get_parentWindow(doc_obj, &parent_window);
1701 ok(hres == S_OK, "get_parentWindow failed: %08x\n", hres);
1702 ok(parent_window != NULL, "parentWindow == NULL\n");
1703
1704 hres = IHTMLWindow2_get_document(parent_window, &doc);
1705 ok(hres == S_OK, "get_document failed: %08x\n", hres);
1706 ok(doc != NULL, "doc == NULL\n");
1707 ok(iface_cmp((IUnknown*)doc, (IUnknown*)container), "container != doc\n");
1708 IHTMLDocument2_Release(doc);
1709
1710 hres = IOleClientSite_QueryInterface(client_site, &IID_IServiceProvider, (void**)&serv_prov);
1711 ok(hres == S_OK, "Could not get IServiceProvider iface: %08x\n", hres);
1712
1713 hres = IServiceProvider_QueryService(serv_prov, &IID_IHTMLWindow2, &IID_IHTMLWindow2, (void**)&html_window);
1714 ok(hres == S_OK, "Could not get IHTMLWindow2 service: %08x\n", hres);
1715 todo_wine
1716 ok(!iface_cmp((IUnknown*)html_window, (IUnknown*)parent_window), "html_window != parent_window\n");
1717 IHTMLWindow2_Release(html_window);
1718
1719 SET_EXPECT(QueryService_TestActiveX);
1720 hres = IServiceProvider_QueryService(serv_prov, &CLSID_TestActiveX, &IID_IUnknown, (void**)&unk);
1721 ok(hres == S_OK, "QueryService(CLSID_TestActiveX) failed: %08x\n", hres);
1722 ok(unk == (IUnknown*)&OleObject, "unexpected unk %p\n", unk);
1723 CHECK_CALLED(QueryService_TestActiveX);
1724 IUnknown_Release(unk);
1725
1726 IServiceProvider_Release(serv_prov);
1727
1728 IHTMLWindow2_Release(parent_window);
1729 IOleContainer_Release(container);
1730}
1731
1732static void test_ui_activate(void)
1733{
1734 IOleInPlaceSite *ip_site;
1735 HRESULT hres;
1736
1737 hres = IOleClientSite_QueryInterface(client_site, &IID_IOleInPlaceSite, (void**)&ip_site);
1738 ok(hres == S_OK, "Could not get IOleInPlaceSite iface: %08x\n", hres);
1739
1740 SET_EXPECT(Invoke_ENABLED);
1741 hres = IOleInPlaceSite_OnUIActivate(ip_site);
1742 ok(hres == S_OK, "OnUIActivate failed: %08x\n", hres);
1743 CLEAR_CALLED(Invoke_ENABLED); /* Not called on IE10 */
1744
1745 IOleInPlaceSite_Release(ip_site);
1746}
1747
1748static HRESULT cs_qi(REFIID,void **);
1750
1752{
1753 static const GUID undocumented_frame_iid = {0xfbece6c9,0x48d7,0x4a37,{0x8f,0xe3,0x6a,0xd4,0x27,0x2f,0xdd,0xac}};
1754
1755 if(!IsEqualGUID(&undocumented_frame_iid, riid))
1756 ok(0, "unexpected riid %s\n", wine_dbgstr_guid(riid));
1757
1758 *ppv = NULL;
1759 return E_NOINTERFACE;
1760}
1761
1763{
1764 return 2;
1765}
1766
1768{
1769 return 1;
1770}
1771
1773{
1774 return E_NOTIMPL;
1775}
1776
1778{
1779 return E_NOTIMPL;
1780}
1781
1783{
1784 return E_NOTIMPL;
1785}
1786
1788 LPCBORDERWIDTHS pborderwidths)
1789{
1790 return E_NOTIMPL;
1791}
1792
1794 LPCBORDERWIDTHS pborderwidths)
1795{
1796 return S_OK;
1797}
1798
1800 IOleInPlaceActiveObject *pActiveObject, LPCOLESTR pszObjName)
1801{
1802 return S_OK;
1803}
1804
1806 IOleInPlaceActiveObject *pActiveObject, LPCOLESTR pszObjName)
1807{
1808 return S_OK;
1809}
1810
1812 LPOLEMENUGROUPWIDTHS lpMenuWidths)
1813{
1814 return E_NOTIMPL;
1815}
1816
1818 HOLEMENU holemenu, HWND hwndActiveObject)
1819{
1820 ok(0, "unexpected call\n");
1821 return E_NOTIMPL;
1822}
1823
1825{
1826 ok(0, "unexpected call\n");
1827 return E_NOTIMPL;
1828}
1829
1830static HRESULT WINAPI InPlaceFrame_SetStatusText(IOleInPlaceFrame *iface, LPCOLESTR pszStatusText)
1831{
1832 return S_OK;
1833}
1834
1836{
1837 return E_NOTIMPL;
1838}
1839
1841{
1842 ok(0, "unexpected call\n");
1843 return E_NOTIMPL;
1844}
1845
1846static const IOleInPlaceFrameVtbl InPlaceFrameVtbl = {
1862};
1863
1865
1866static const IOleInPlaceFrameVtbl InPlaceUIWindowVtbl = {
1876};
1877
1879
1881{
1882 return cs_qi(riid, ppv);
1883}
1884
1886{
1887 return 2;
1888}
1889
1891{
1892 return 1;
1893}
1894
1896{
1897 *phwnd = container_hwnd;
1898 return S_OK;
1899}
1900
1902{
1903 ok(0, "unexpected call\n");
1904 return E_NOTIMPL;
1905}
1906
1908{
1909 return S_OK;
1910}
1911
1913{
1914 return S_OK;
1915}
1916
1918{
1919 return S_OK;
1920}
1921
1923 IOleInPlaceFrame **ppFrame, IOleInPlaceUIWindow **ppDoc, LPRECT lprcPosRect,
1924 LPRECT lprcClipRect, LPOLEINPLACEFRAMEINFO lpFrameInfo)
1925{
1926 static const RECT rect = {0,0,500,500};
1927
1928 *ppFrame = &InPlaceFrame;
1930 *lprcPosRect = rect;
1931 *lprcClipRect = rect;
1932
1933 lpFrameInfo->fMDIApp = FALSE;
1934 lpFrameInfo->hwndFrame = container_hwnd;
1935 lpFrameInfo->haccel = NULL;
1936 lpFrameInfo->cAccelEntries = 0;
1937
1938 return S_OK;
1939}
1940
1942{
1943 return E_NOTIMPL;
1944}
1945
1947{
1948 return S_OK;
1949}
1950
1952{
1953 return S_OK;
1954}
1955
1957{
1958 return E_NOTIMPL;
1959}
1960
1962{
1963 return E_NOTIMPL;
1964}
1965
1967{
1968 return E_NOTIMPL;
1969}
1970
1971static const IOleInPlaceSiteVtbl InPlaceSiteVtbl = {
1987};
1988
1990
1992{
1993 return cs_qi(riid, ppv);
1994}
1995
1997{
1998 return 2;
1999}
2000
2002{
2003 return 1;
2004}
2005
2007{
2008 ok(0, "unexpected call\n");
2009 return E_NOTIMPL;
2010}
2011
2012static HRESULT WINAPI ClientSite_GetMoniker(IOleClientSite *iface, DWORD dwAssign, DWORD dwWhichMoniker,
2013 IMoniker **ppmon)
2014{
2015 ok(0, "unexpected call\n");
2016 return E_NOTIMPL;
2017}
2018
2020{
2021 return E_NOTIMPL;
2022}
2023
2025{
2026 ok(0, "unexpected call\n");
2027 return E_NOTIMPL;
2028}
2029
2031{
2032 ok(0, "unexpected call\n");
2033 return E_NOTIMPL;
2034}
2035
2037{
2038 ok(0, "unexpected call\n");
2039 return E_NOTIMPL;
2040}
2041
2042static const IOleClientSiteVtbl ClientSiteVtbl = {
2052};
2053
2055
2057{
2058 return cs_qi(riid, ppv);
2059}
2060
2062{
2063 return 2;
2064}
2065
2067{
2068 return 1;
2069}
2070
2072{
2073 RECT rect = {0,0,400,500};
2074 IOleDocument *document;
2075 HRESULT hres;
2076
2077 hres = IOleDocumentView_QueryInterface(pViewToActivate, &IID_IOleDocument, (void**)&document);
2078 ok(hres == S_OK, "could not get IOleDocument: %08x\n", hres);
2079
2080 hres = IOleDocument_CreateView(document, &InPlaceSite, NULL, 0, &view);
2081 IOleDocument_Release(document);
2082 ok(hres == S_OK, "CreateView failed: %08x\n", hres);
2083
2084 hres = IOleDocumentView_SetInPlaceSite(view, &InPlaceSite);
2085 ok(hres == S_OK, "SetInPlaceSite failed: %08x\n", hres);
2086
2087 hres = IOleDocumentView_UIActivate(view, TRUE);
2088 ok(hres == S_OK, "UIActivate failed: %08x\n", hres);
2089
2090 hres = IOleDocumentView_SetRect(view, &rect);
2091 ok(hres == S_OK, "SetRect failed: %08x\n", hres);
2092
2093 hres = IOleDocumentView_Show(view, TRUE);
2094 ok(hres == S_OK, "Show failed: %08x\n", hres);
2095
2096 return S_OK;
2097}
2098
2099static const IOleDocumentSiteVtbl DocumentSiteVtbl = {
2104};
2105
2107
2109 REFIID riid, void **ppv)
2110{
2111 return cs_qi(riid, ppv);
2112}
2113
2115{
2116 return 2;
2117}
2118
2120{
2121 return 1;
2122}
2123
2125 REFIID riid, void **ppv)
2126{
2127 if(IsEqualGUID(&CLSID_TestActiveX, guidService)) {
2128 CHECK_EXPECT(QueryService_TestActiveX);
2129 ok(IsEqualGUID(&IID_IUnknown, riid), "unexpected riid %s\n", wine_dbgstr_guid(riid));
2130 *ppv = &OleObject;
2131 return S_OK;
2132 }
2133
2134 *ppv = NULL;
2135 return E_NOINTERFACE;
2136}
2137
2138static const IServiceProviderVtbl ServiceProviderVtbl = {
2143};
2144
2146
2147static HRESULT cs_qi(REFIID riid, void **ppv)
2148{
2149 *ppv = NULL;
2150
2152 *ppv = &ClientSite;
2153 else if(IsEqualGUID(&IID_IOleDocumentSite, riid))
2154 *ppv = &DocumentSite;
2156 *ppv = &InPlaceSite;
2157 else if(IsEqualGUID(riid, &IID_IServiceProvider))
2158 *ppv = &ServiceProvider;
2159
2160 return *ppv ? S_OK : E_NOINTERFACE;
2161}
2162
2163static IHTMLDocument2 *notif_doc;
2165
2167 REFIID riid, void**ppv)
2168{
2170 *ppv = iface;
2171 return S_OK;
2172 }
2173
2174 ok(0, "unexpected call\n");
2175 return E_NOINTERFACE;
2176}
2177
2179{
2180 return 2;
2181}
2182
2184{
2185 return 1;
2186}
2187
2189{
2190 if(dispID == DISPID_READYSTATE){
2191 BSTR state;
2192 HRESULT hres;
2193
2194 static const WCHAR completeW[] = {'c','o','m','p','l','e','t','e',0};
2195
2196 hres = IHTMLDocument2_get_readyState(notif_doc, &state);
2197 ok(hres == S_OK, "get_readyState failed: %08x\n", hres);
2198
2199 if(!lstrcmpW(state, completeW))
2201
2203 }
2204
2205 return S_OK;
2206}
2207
2209{
2210 ok(0, "unexpected call\n");
2211 return E_NOTIMPL;
2212}
2213
2214static IPropertyNotifySinkVtbl PropertyNotifySinkVtbl = {
2220};
2221
2223
2224static void doc_load_string(IHTMLDocument2 *doc, const char *str)
2225{
2227 IStream *stream;
2228 HGLOBAL mem;
2229 SIZE_T len;
2230
2231 notif_doc = doc;
2232
2234 len = strlen(str);
2235 mem = GlobalAlloc(0, len);
2236 memcpy(mem, str, len);
2238
2239 IHTMLDocument2_QueryInterface(doc, &IID_IPersistStreamInit, (void**)&init);
2240
2241 IPersistStreamInit_Load(init, stream);
2242 IPersistStreamInit_Release(init);
2243 IStream_Release(stream);
2244}
2245
2246static void do_advise(IUnknown *unk, REFIID riid, IUnknown *unk_advise)
2247{
2250 DWORD cookie;
2251 HRESULT hres;
2252
2253 hres = IUnknown_QueryInterface(unk, &IID_IConnectionPointContainer, (void**)&container);
2254 ok(hres == S_OK, "QueryInterface(IID_IConnectionPointContainer) failed: %08x\n", hres);
2255
2256 hres = IConnectionPointContainer_FindConnectionPoint(container, riid, &cp);
2257 IConnectionPointContainer_Release(container);
2258 ok(hres == S_OK, "FindConnectionPoint failed: %08x\n", hres);
2259
2260 hres = IConnectionPoint_Advise(cp, unk_advise, &cookie);
2261 IConnectionPoint_Release(cp);
2262 ok(hres == S_OK, "Advise failed: %08x\n", hres);
2263}
2264
2265static void set_client_site(IHTMLDocument2 *doc, BOOL set)
2266{
2267 IOleObject *oleobj;
2268 HRESULT hres;
2269
2270 if(!set && view) {
2271 IOleDocumentView_Show(view, FALSE);
2272 IOleDocumentView_CloseView(view, 0);
2273 IOleDocumentView_SetInPlaceSite(view, NULL);
2274 IOleDocumentView_Release(view);
2275 view = NULL;
2276 }
2277
2278 hres = IHTMLDocument2_QueryInterface(doc, &IID_IOleObject, (void**)&oleobj);
2279 ok(hres == S_OK, "Could not et IOleObject: %08x\n", hres);
2280
2281 hres = IOleObject_SetClientSite(oleobj, set ? &ClientSite : NULL);
2282 ok(hres == S_OK, "SetClientSite failed: %08x\n", hres);
2283
2284 if(set) {
2285 IHlinkTarget *hlink;
2286
2287 hres = IOleObject_QueryInterface(oleobj, &IID_IHlinkTarget, (void**)&hlink);
2288 ok(hres == S_OK, "Could not get IHlinkTarget iface: %08x\n", hres);
2289
2290 hres = IHlinkTarget_Navigate(hlink, 0, NULL);
2291 ok(hres == S_OK, "Navgate failed: %08x\n", hres);
2292
2293 IHlinkTarget_Release(hlink);
2294 }
2295
2296 IOleObject_Release(oleobj);
2297}
2298static IHTMLDocument2 *create_document(void)
2299{
2300 IHTMLDocument2 *doc;
2301 HRESULT hres;
2302
2303 hres = CoCreateInstance(&CLSID_HTMLDocument, NULL, CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER,
2304 &IID_IHTMLDocument2, (void**)&doc);
2305 ok(hres == S_OK, "CoCreateInstance failed: %08x\n", hres);
2306
2307 return doc;
2308}
2309
2310static IHTMLDocument2 *create_doc(const char *str)
2311{
2312 IHTMLDocument2 *doc;
2313 MSG msg;
2314
2315 doc = create_document();
2316 set_client_site(doc, TRUE);
2317 doc_load_string(doc, str);
2319
2320 while(!doc_complete && GetMessageW(&msg, NULL, 0, 0)) {
2323 }
2324
2325 return doc;
2326}
2327
2328static void release_doc(IHTMLDocument2 *doc)
2329{
2330 ULONG ref;
2331
2332 set_client_site(doc, FALSE);
2333 ref = IHTMLDocument2_Release(doc);
2334 ok(!ref || broken(ref == 1) /* Vista */, "ref = %d\n", ref);
2335
2336 if(client_site) {
2337 IOleClientSite_Release(client_site);
2338 client_site = NULL;
2339 }
2340
2341 if(plugin_hwnd) {
2343 plugin_hwnd = NULL;
2344 }
2345
2346 ok(!activex_refcnt, "activex_refcnt = %d\n", activex_refcnt);
2347}
2348
2349static void init_test(int behavior)
2350{
2351 plugin_behavior = behavior;
2352
2353 activex_refcnt = 0;
2354 no_quickact = behavior == TEST_NOQUICKACT || behavior == TEST_DISPONLY;
2356}
2357
2358static void test_event_call(void)
2359{
2360 VARIANT res, args[2];
2361 DISPPARAMS dp = {args};
2362 EXCEPINFO ei = {0};
2363 HRESULT hres;
2364
2365 V_VT(&res) = VT_EMPTY;
2366 hres = IDispatch_Invoke(sink_disp, 1, &IID_NULL, 0, DISPATCH_METHOD, &dp, &res, &ei, NULL);
2367 ok(hres == S_OK, "Invoke failed: %08x\n", hres);
2368 ok(V_VT(&res) == VT_I4 && V_I4(&res) == 6, "unexpected result\n");
2369
2370 V_VT(args) = VT_I4;
2371 V_I4(args) = 2;
2372 V_VT(args+1) = VT_I4;
2373 V_I4(args+1) = 3;
2374 dp.cArgs = 2;
2375 V_VT(&res) = VT_EMPTY;
2376 hres = IDispatch_Invoke(sink_disp, 2, &IID_NULL, 0, DISPATCH_METHOD, &dp, &res, &ei, NULL);
2377 ok(hres == S_OK, "Invoke failed: %08x\n", hres);
2378 ok(V_VT(&res) == VT_I4 && V_I4(&res) == 7, "unexpected result: %d\n", V_I4(&res));
2379
2380 V_VT(&res) = VT_ERROR;
2381 hres = IDispatch_Invoke(sink_disp, 10, &IID_NULL, 0, DISPATCH_METHOD, &dp, &res, &ei, NULL);
2382 ok(hres == S_OK, "Invoke failed: %08x\n", hres);
2383 ok(V_VT(&res) == VT_EMPTY, "V_VT(res) = %d\n", V_VT(&res));
2384}
2385
2386static void test_flash_ax(void)
2387{
2388 IHTMLDocument2 *doc;
2390
2392
2393 SET_EXPECT(CreateInstance);
2394 SET_EXPECT(FreezeEvents_TRUE);
2396 SET_EXPECT(FreezeEvents_FALSE);
2397 SET_EXPECT(IPersistPropertyBag_Load);
2398 SET_EXPECT(Invoke_READYSTATE);
2399 SET_EXPECT(Invoke_SECURITYCTX);
2400 SET_EXPECT(Invoke_SCRIPTCALL);
2401 SET_EXPECT(SetExtent);
2402 SET_EXPECT(GetExtent);
2403 SET_EXPECT(DoVerb);
2404
2406
2407 CHECK_CALLED(CreateInstance);
2408 todo_wine
2409 CHECK_CALLED(FreezeEvents_TRUE);
2411 todo_wine
2412 CHECK_CALLED(FreezeEvents_FALSE);
2413 CHECK_CALLED(IPersistPropertyBag_Load);
2414 CHECK_CALLED(Invoke_READYSTATE);
2415 CHECK_CALLED(Invoke_SECURITYCTX);
2416 CHECK_CALLED(Invoke_SCRIPTCALL);
2417 todo_wine
2418 CHECK_CALLED(SetExtent);
2419 todo_wine
2420 CHECK_CALLED(GetExtent);
2421 CHECK_CALLED(DoVerb);
2422
2423 /* Set in DoVerb */
2424 CHECK_CALLED(InPlaceObject_GetWindow);
2425 CHECK_CALLED(SetObjectRects);
2427 {
2431 }
2432 else
2433 {
2434 skip("Skipping test_ui_activate(). ROSTESTS-114.\n");
2435 skip("Skipping test_container(notif_doc). ROSTESTS-114.\n");
2436 skip("Skipping test_object_elem(notif_doc). ROSTESTS-114.\n");
2437 }
2438
2439 IOleClientSite_AddRef(client_site);
2440 cs = client_site;
2441
2442 SET_EXPECT(UIDeactivate);
2443 SET_EXPECT(Invoke_ENABLED);
2444 SET_EXPECT(Invoke_VALID);
2445 SET_EXPECT(InPlaceDeactivate);
2447 SET_EXPECT(SetClientSite_NULL);
2448 release_doc(doc);
2449 CHECK_CALLED(UIDeactivate);
2450 CLEAR_CALLED(Invoke_ENABLED); /* Not called on IE10 */
2451 todo_wine
2452 CHECK_CALLED(Invoke_VALID);
2453 CHECK_CALLED(InPlaceDeactivate);
2455 CHECK_CALLED(SetClientSite_NULL);
2456
2457 IOleClientSite_Release(cs);
2458}
2459
2460static void test_noquickact_ax(void)
2461{
2462 IHTMLDocument2 *doc;
2463
2465
2466 SET_EXPECT(CreateInstance);
2467 SET_EXPECT(FreezeEvents_TRUE);
2468 SET_EXPECT(GetMiscStatus);
2469 SET_EXPECT(SetClientSite);
2470 SET_EXPECT(SetAdvise);
2471 SET_EXPECT(GetViewStatus);
2472 SET_EXPECT(FreezeEvents_FALSE);
2473 SET_EXPECT(Invoke_READYSTATE);
2474 SET_EXPECT(Invoke_SECURITYCTX);
2475 SET_EXPECT(Invoke_SCRIPTCALL);
2476 SET_EXPECT(SetExtent);
2477 SET_EXPECT(GetExtent);
2478 SET_EXPECT(DoVerb);
2479
2481
2482 CHECK_CALLED(CreateInstance);
2483 todo_wine CHECK_CALLED(FreezeEvents_TRUE);
2484 CHECK_CALLED(GetMiscStatus);
2485 CHECK_CALLED(SetClientSite);
2486 CHECK_CALLED(SetAdvise);
2487 CHECK_CALLED(GetViewStatus);
2488 todo_wine CHECK_CALLED(FreezeEvents_FALSE);
2489 CHECK_CALLED(Invoke_READYSTATE);
2490 CHECK_CALLED(Invoke_SECURITYCTX);
2491 CHECK_CALLED(Invoke_SCRIPTCALL);
2492 todo_wine CHECK_CALLED(SetExtent);
2493 todo_wine CHECK_CALLED(GetExtent);
2494 CHECK_CALLED(DoVerb);
2495
2496 /* Set in DoVerb */
2497 CHECK_CALLED(InPlaceObject_GetWindow);
2498 CHECK_CALLED(SetObjectRects);
2499
2500 SET_EXPECT(InPlaceDeactivate);
2502 SET_EXPECT(SetClientSite_NULL);
2503 release_doc(doc);
2504 CHECK_CALLED(InPlaceDeactivate);
2506 CHECK_CALLED(SetClientSite_NULL);
2507}
2508
2509static void test_event_binding(void)
2510{
2511 IHTMLDocument2 *doc;
2512
2514
2515 SET_EXPECT(CreateInstance);
2516 SET_EXPECT(FreezeEvents_TRUE);
2518 SET_EXPECT(FreezeEvents_FALSE);
2519 SET_EXPECT(IPersistPropertyBag_Load);
2520 SET_EXPECT(Invoke_READYSTATE);
2521 SET_EXPECT(SetExtent);
2522 SET_EXPECT(GetExtent);
2523 SET_EXPECT(DoVerb);
2524
2526 SET_EXPECT(OnAmbientPropertyChange_UNKNOWN);
2527 SET_EXPECT(FindConnectionPoint);
2528 SET_EXPECT(Advise);
2529
2531
2532 CHECK_CALLED(CreateInstance);
2533 todo_wine
2534 CHECK_CALLED(FreezeEvents_TRUE);
2536 todo_wine
2537 CHECK_CALLED(FreezeEvents_FALSE);
2538 CHECK_CALLED(IPersistPropertyBag_Load);
2539 CHECK_CALLED(Invoke_READYSTATE);
2540 todo_wine
2541 CHECK_CALLED(SetExtent);
2542 todo_wine
2543 CHECK_CALLED(GetExtent);
2544 CHECK_CALLED(DoVerb);
2545
2546 /* Set in DoVerb */
2547 CHECK_CALLED(InPlaceObject_GetWindow);
2548 CHECK_CALLED(SetObjectRects);
2549
2551 todo_wine
2552 CHECK_CALLED(OnAmbientPropertyChange_UNKNOWN);
2553 CHECK_CALLED(FindConnectionPoint);
2554 CHECK_CALLED(Advise);
2555
2558 else
2559 skip("Skipping test_event_call(). ROSTESTS-114.\n");
2560
2561 SET_EXPECT(InPlaceDeactivate);
2563 SET_EXPECT(SetClientSite_NULL);
2564 SET_EXPECT(FindConnectionPoint);
2565 SET_EXPECT(Unadvise);
2566 release_doc(doc);
2567 CHECK_CALLED(InPlaceDeactivate);
2569 CHECK_CALLED(SetClientSite_NULL);
2570 CHECK_CALLED(FindConnectionPoint);
2571 CHECK_CALLED(Unadvise);
2572}
2573
2574static void test_nooleobj_ax(void)
2575{
2576 IHTMLDocument2 *doc;
2577
2579
2580 SET_EXPECT(CreateInstance);
2581 SET_EXPECT(Invoke_READYSTATE);
2582 SET_EXPECT(Invoke_SECURITYCTX);
2583 SET_EXPECT(Invoke_SCRIPTCALL);
2584
2586
2587 CHECK_CALLED(CreateInstance);
2588 CHECK_CALLED(Invoke_READYSTATE);
2589 CHECK_CALLED(Invoke_SECURITYCTX);
2590 CHECK_CALLED(Invoke_SCRIPTCALL);
2591
2592 release_doc(doc);
2593}
2594
2595static void test_exec_script(IHTMLDocument2 *doc, const char *codea, const char *langa)
2596{
2598 BSTR code, lang;
2599 VARIANT v;
2600 HRESULT hres;
2601
2602 hres = IHTMLDocument2_get_parentWindow(doc, &window);
2603 ok(hres == S_OK, "get_parentWindow failed: %08x\n", hres);
2604
2605 code = a2bstr(codea);
2606 lang = a2bstr(langa);
2607
2608 hres = IHTMLWindow2_execScript(window, code, lang, &v);
2609 ok(hres == S_OK, "execScript failed: %08x\n", hres);
2611 VariantClear(&v);
2612
2613 IHTMLWindow2_Release(window);
2614}
2615
2616static void test_create_element(void)
2617{
2618 IHTMLDocument2 *doc;
2619
2621
2622 doc = create_doc("<html></html>");
2623
2625
2626 SET_EXPECT(CreateInstance);
2627 SET_EXPECT(FreezeEvents_TRUE);
2629 SET_EXPECT(IPersistPropertyBag_InitNew);
2630 SET_EXPECT(Invoke_READYSTATE);
2631 SET_EXPECT(FreezeEvents_FALSE);
2632
2633 test_exec_script(doc,
2634 "var test_elem = document.createElement('object');"
2635 "test_elem.classid = 'CLSID:178fc163-f585-4e24-9c13-4bb7f6680746';",
2636 "javascript");
2637
2638 CHECK_CALLED(CreateInstance);
2639 todo_wine CHECK_CALLED(FreezeEvents_TRUE);
2641 CHECK_CALLED(IPersistPropertyBag_InitNew);
2642 CHECK_CALLED(Invoke_READYSTATE);
2643 todo_wine CHECK_CALLED(FreezeEvents_FALSE);
2644
2646
2647 SET_EXPECT(DoVerb);
2648 test_exec_script(doc,
2649 "document.body.appendChild(test_elem);",
2650 "javascript");
2651 todo_wine CHECK_CALLED(DoVerb);
2652
2653 SET_EXPECT(InPlaceDeactivate);
2655 SET_EXPECT(SetClientSite_NULL);
2656 release_doc(doc);
2657 todo_wine CHECK_CALLED(InPlaceDeactivate);
2659 CHECK_CALLED(SetClientSite_NULL);
2660}
2661
2663{
2664 return DefWindowProcW(hwnd, msg, wParam, lParam);
2665}
2666
2668{
2669 static const WCHAR html_document_testW[] =
2670 {'H','T','M','L','D','o','c','u','m','e','n','t','T','e','s','t',0};
2671 static WNDCLASSEXW wndclass = {
2672 sizeof(WNDCLASSEXW),
2673 0,
2674 wnd_proc,
2675 0, 0, NULL, NULL, NULL, NULL, NULL,
2676 html_document_testW,
2677 NULL
2678 };
2679
2680 RegisterClassExW(&wndclass);
2681 return CreateWindowW(html_document_testW, html_document_testW,
2683 515, 530, NULL, NULL, NULL, NULL);
2684}
2685
2686static void load_typelib(void)
2687{
2690 HRESULT hres;
2691
2693
2695 ok(hres == S_OK, "LoadTypeLib failed: %08x\n", hres);
2696
2697 hres = ITypeLib_GetTypeInfoOfGuid(typelib, &DIID_DispActiveXTest, &actxtest_typeinfo);
2698 ok(hres == S_OK, "GetTypeInfoOfGuid(DIID_DispActiveXTest) failed: %08x\n", hres);
2699
2700 hres = ITypeLib_GetTypeInfoOfGuid(typelib, &CLSID_ActiveXTest, &class_typeinfo);
2701 ok(hres == S_OK, "GetTypeInfoOfGuid(CLSID_ActiveXTest) failed: %08x\n", hres);
2702
2703 ITypeLib_Release(typelib);
2704}
2705
2706static BOOL init_key(const char *key_name, const char *def_value, BOOL init)
2707{
2708 HKEY hkey;
2709 DWORD res;
2710
2711 if(!init) {
2713 return TRUE;
2714 }
2715
2717 if(res != ERROR_SUCCESS)
2718 return FALSE;
2719
2720 if(def_value)
2721 res = RegSetValueA(hkey, NULL, REG_SZ, def_value, strlen(def_value));
2722
2723 RegCloseKey(hkey);
2724
2725 return res == ERROR_SUCCESS;
2726}
2727
2729{
2730 return init_key("TestActiveX\\CLSID", TESTACTIVEX_CLSID, init)
2731 && init_key("CLSID\\"TESTACTIVEX_CLSID"\\Implemented Categories\\{7dd95801-9882-11cf-9fa9-00aa006c42c4}",
2732 NULL, init)
2733 && init_key("CLSID\\"TESTACTIVEX_CLSID"\\Implemented Categories\\{7dd95802-9882-11cf-9fa9-00aa006c42c4}",
2734 NULL, init);
2735}
2736
2738{
2739 DWORD regid;
2740 HRESULT hres;
2741
2742 if(!init_registry(TRUE)) {
2744 return FALSE;
2745 }
2746
2748 CLSCTX_INPROC_SERVER, REGCLS_MULTIPLEUSE, &regid);
2749 ok(hres == S_OK, "Could not register control: %08x\n", hres);
2750
2751 return TRUE;
2752}
2753
2754static BOOL check_ie(void)
2755{
2756 IHTMLDocument5 *doc;
2757 HRESULT hres;
2758
2759 hres = CoCreateInstance(&CLSID_HTMLDocument, NULL, CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER,
2760 &IID_IHTMLDocument5, (void**)&doc);
2761 if(FAILED(hres))
2762 return FALSE;
2763
2764 IHTMLDocument5_Release(doc);
2765 return TRUE;
2766}
2767
2769{
2771
2772 if(!check_ie()) {
2774 win_skip("Too old IE\n");
2775 return;
2776 }
2777
2778 if(is_ie_hardened()) {
2780 win_skip("IE running in Enhanced Security Configuration\n");
2781 return;
2782 }
2783
2785 load_typelib();
2788
2789 if(register_activex()) {
2790 trace("Testing emulated flash embedding...\n");
2791 test_flash_ax();
2792 trace("Testing plugin without IQuickActivate iface...\n");
2794 trace("Testing plugin with IDispatch iface only...\n");
2796 trace("Testing event object binding...\n");
2798 trace("Testing createElement(object)...\n");
2801 }else {
2802 skip("Could not register ActiveX\n");
2803 }
2804
2806 ITypeInfo_Release(actxtest_typeinfo);
2807 if(class_typeinfo)
2808 ITypeInfo_Release(class_typeinfo);
2811}
#define broken(x)
Definition: _sntprintf.h:21
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
Definition: utclib.c:112
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
static int state
Definition: maze.c:121
static ITypeLib * typelib
Definition: apps.c:108
#define trace
Definition: atltest.h:70
#define ok(value,...)
Definition: atltest.h:57
#define skip(...)
Definition: atltest.h:64
#define START_TEST(x)
Definition: atltest.h:75
#define ok_(x1, x2)
Definition: atltest.h:61
#define msg(x)
Definition: auth_time.c:54
const GUID IID_IUnknown
const GUID IID_IClassFactory
#define RegCloseKey(hKey)
Definition: registry.h:49
const CLSID CLSID_IdentityUnmarshal
Definition: _set.h:50
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139
static HWND hwndParent
Definition: cryptui.c:300
#define E_INVALIDARG
Definition: ddrawi.h:101
#define E_NOTIMPL
Definition: ddrawi.h:99
#define E_FAIL
Definition: ddrawi.h:102
#define ERROR_SUCCESS
Definition: deptool.c:10
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
LONG WINAPI RegCreateKeyA(HKEY hKey, LPCSTR lpSubKey, PHKEY phkResult)
Definition: reg.c:1179
LONG WINAPI RegSetValueA(HKEY hKeyOriginal, LPCSTR lpSubKey, DWORD dwType, LPCSTR lpData, DWORD cbData)
Definition: reg.c:4983
LONG WINAPI RegDeleteKeyA(_In_ HKEY hKey, _In_ LPCSTR lpSubKey)
Definition: reg.c:1224
#define CP_ACP
Definition: compat.h:109
OLECHAR * BSTR
Definition: compat.h:2293
#define MAX_PATH
Definition: compat.h:34
#define WideCharToMultiByte
Definition: compat.h:111
#define MultiByteToWideChar
Definition: compat.h:110
@ VT_BSTR
Definition: compat.h:2303
@ VT_ERROR
Definition: compat.h:2305
@ VT_I4
Definition: compat.h:2298
@ VT_EMPTY
Definition: compat.h:2295
DWORD WINAPI GetModuleFileNameW(HINSTANCE hModule, LPWSTR lpFilename, DWORD nSize)
Definition: loader.c:600
HRESULT WINAPI CoRegisterClassObject(REFCLSID rclsid, LPUNKNOWN pUnk, DWORD dwClsContext, DWORD flags, LPDWORD lpdwRegister)
Definition: compobj.c:2897
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID iid, LPVOID *ppv)
Definition: compobj.c:3325
HRESULT WINAPI CoInitialize(LPVOID lpReserved)
Definition: compobj.c:1964
void WINAPI DECLSPEC_HOTPATCH CoUninitialize(void)
Definition: compobj.c:2067
HRESULT WINAPI CreateStreamOnHGlobal(HGLOBAL hGlobal, BOOL fDeleteOnRelease, LPSTREAM *ppstm)
HRESULT WINAPI LoadTypeLib(const OLECHAR *szFile, ITypeLib **pptLib)
Definition: typelib.c:458
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
Definition: typeof.h:31
#define RGB(r, g, b)
Definition: precomp.h:62
r parent
Definition: btrfs.c:3010
#define regid
Definition: ecma_167.h:64
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
unsigned short WORD
Definition: ntddk_ex.h:93
pKey DeleteObject()
const GLdouble * v
Definition: gl.h:2040
GLuint res
Definition: glext.h:9613
GLenum GLuint GLint GLenum face
Definition: glext.h:7025
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
GLenum GLsizei len
Definition: glext.h:6722
GLuint id
Definition: glext.h:5910
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
HGLOBAL NTAPI GlobalAlloc(UINT uFlags, SIZE_T dwBytes)
Definition: heapmem.c:368
#define cs
Definition: i386-dis.c:442
#define DISPID_READYSTATE
Definition: idispids.h:22
VOID WINAPI CoTaskMemFree(LPVOID ptr)
Definition: ifs.c:442
REFIID riid
Definition: atlbase.h:39
REFIID LPVOID * ppv
Definition: atlbase.h:39
ULONG AddRef()
HRESULT QueryInterface([in] REFIID riid, [out, iid_is(riid)] void **ppvObject)
ULONG Release()
#define S_OK
Definition: intsafe.h:52
#define SUCCEEDED(hr)
Definition: intsafe.h:50
#define FAILED(hr)
Definition: intsafe.h:51
#define d
Definition: ke_i.h:81
#define wine_dbgstr_w
Definition: kernel32.h:34
#define REG_SZ
Definition: layer.c:22
int WINAPI lstrcmpW(LPCWSTR lpString1, LPCWSTR lpString2)
Definition: lstring.c:170
int WINAPI lstrcmpA(LPCSTR lpString1, LPCSTR lpString2)
Definition: lstring.c:18
POINT cp
Definition: magnifier.c:59
static const WCHAR dc[]
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
static HDC
Definition: imagelist.c:92
HRESULT hres
Definition: protocol.c:465
static HRESULT WINAPI ServiceProvider_QueryService(IServiceProvider *iface, REFGUID guidService, REFIID riid, void **ppv)
Definition: activex.c:551
#define SET_EXPECT(func)
Definition: activex.c:63
static HRESULT WINAPI ClassFactory_CreateInstance(IClassFactory *iface, IUnknown *outer, REFIID riid, void **ppv)
Definition: activex.c:419
static IClassFactory activex_cf
Definition: activex.c:445
static HRESULT WINAPI ClassFactory_LockServer(IClassFactory *iface, BOOL dolock)
Definition: activex.c:431
static ULONG WINAPI ServiceProvider_Release(IServiceProvider *iface)
Definition: activex.c:546
static const IClassFactoryVtbl ClassFactoryVtbl
Definition: activex.c:437
static BOOL init_registry(BOOL init)
Definition: activex.c:1095
#define CHECK_EXPECT(func)
Definition: activex.c:72
static ULONG WINAPI ClassFactory_Release(IClassFactory *iface)
Definition: activex.c:414
#define DEFINE_EXPECT(func)
Definition: activex.c:60
static BSTR a2bstr(const char *str)
Definition: activex.c:119
static int strcmp_wa(LPCWSTR strw, const char *stra)
Definition: activex.c:131
static IServiceProvider ServiceProvider
Definition: activex.c:533
static BOOL init_key(const char *key_name, const char *def_value, BOOL init)
Definition: activex.c:1073
static HRESULT WINAPI ClassFactory_QueryInterface(IClassFactory *iface, REFIID riid, void **ppv)
Definition: activex.c:397
#define CHECK_CALLED(func)
Definition: activex.c:78
static ULONG WINAPI ClassFactory_AddRef(IClassFactory *iface)
Definition: activex.c:409
static BOOL register_activex(void)
Definition: activex.c:1100
static HRESULT WINAPI ServiceProvider_QueryInterface(IServiceProvider *iface, REFIID riid, void **ppv)
Definition: activex.c:535
static IServiceProviderVtbl ServiceProviderVtbl
Definition: activex.c:572
static ULONG WINAPI ServiceProvider_AddRef(IServiceProvider *iface)
Definition: activex.c:541
static const char * strw(LPCWSTR x)
Definition: actctx.c:49
static HRESULT WINAPI InPlaceFrame_InsertMenus(IOleInPlaceFrame *iface, HMENU hmenuShared, LPOLEMENUGROUPWIDTHS lpMenuWidths)
Definition: activex.c:1811
static const IProvideClassInfoVtbl ProvideClassInfoVtbl
Definition: activex.c:827
static ULONG WINAPI wrapped_AddRef(IUnknown *iface)
Definition: activex.c:1372
static HRESULT WINAPI OleControl_FreezeEvents(IOleControl *iface, BOOL bFreeze)
Definition: activex.c:405
static HRESULT WINAPI OleInPlaceObject_QueryInterface(IOleInPlaceObjectWindowless *iface, REFIID riid, void **ppv)
Definition: activex.c:1262
static const IOleInPlaceFrameVtbl InPlaceFrameVtbl
Definition: activex.c:1846
static const GUID CLSID_TestActiveX
Definition: activex.c:107
static ITypeInfo * actxtest_typeinfo
Definition: activex.c:99
static IOleDocumentSite DocumentSite
Definition: activex.c:2106
static IPropertyNotifySinkVtbl PropertyNotifySinkVtbl
Definition: activex.c:2214
static const IQuickActivateVtbl QuickActivateVtbl
Definition: activex.c:507
static HRESULT WINAPI InPlaceSite_OnPosRectChange(IOleInPlaceSite *iface, LPCRECT lprcPosRect)
Definition: activex.c:1966
#define CLEAR_CALLED(func)
Definition: activex.c:47
static HRESULT WINAPI InPlaceUIWindow_SetActiveObject(IOleInPlaceFrame *iface, IOleInPlaceActiveObject *pActiveObject, LPCOLESTR pszObjName)
Definition: activex.c:1799
static HRESULT WINAPI OleInPlaceObjectWindowless_GetDropTarget(IOleInPlaceObjectWindowless *iface, IDropTarget **ppDropTarget)
Definition: activex.c:1339
static HRESULT WINAPI OleObject_GetMiscStatus(IOleObject *iface, DWORD dwAspect, DWORD *pdwStatus)
Definition: activex.c:1217
static HRESULT WINAPI ConnectionPoint_Advise(IConnectionPoint *iface, IUnknown *pUnkSink, DWORD *pdwCookie)
Definition: activex.c:308
static HRESULT WINAPI OleObject_IsUpToDate(IOleObject *iface)
Definition: activex.c:1169
static HRESULT WINAPI OleObject_Advise(IOleObject *iface, IAdviseSink *pAdvSink, DWORD *pdwConnection)
Definition: activex.c:1199
static HRESULT WINAPI OleInPlaceObject_ContextSensitiveHelp(IOleInPlaceObjectWindowless *iface, BOOL fEnterMode)
Definition: activex.c:1289
static ULONG WINAPI QuickActivate_AddRef(IQuickActivate *iface)
Definition: activex.c:431
static HRESULT WINAPI ClientSite_RequestNewObjectLayout(IOleClientSite *iface)
Definition: activex.c:2036
static HRESULT WINAPI InPlaceFrame_EnableModeless(IOleInPlaceFrame *iface, BOOL fEnable)
Definition: activex.c:1835
static HRESULT WINAPI ViewObjectEx_Unfreeze(IViewObjectEx *iface, DWORD dwFreeze)
Definition: activex.c:920
static HRESULT WINAPI ViewObjectEx_GetRect(IViewObjectEx *iface, DWORD dwAspect, LPRECTL pRect)
Definition: activex.c:949
static int plugin_behavior
Definition: activex.c:101
static HRESULT WINAPI ViewObjectEx_Draw(IViewObjectEx *iface, DWORD dwDrawAspect, LONG lindex, void *pvAspect, DVTARGETDEVICE *ptd, HDC hdcTargetDev, HDC hdcDraw, LPCRECTL lprcBounds, LPCRECTL lprcWBoungs, BOOL(WINAPI *pfnContinue)(ULONG_PTR), ULONG_PTR dwContinue)
Definition: activex.c:900
static REFIID pluginhost_iids[]
Definition: activex.c:134
static ULONG WINAPI DocumentSite_Release(IOleDocumentSite *iface)
Definition: activex.c:2066
static const IOleDocumentSiteVtbl DocumentSiteVtbl
Definition: activex.c:2099
static ULONG WINAPI InPlaceSite_AddRef(IOleInPlaceSite *iface)
Definition: activex.c:1885
static const char event_binding_str[]
Definition: activex.c:124
static HRESULT WINAPI ConnectionPoint_QueryInterface(IConnectionPoint *iface, REFIID riid, void **ppv)
Definition: activex.c:279
static HRESULT WINAPI ViewObjectEx_QueryHitRect(IViewObjectEx *iface, DWORD dwAspect, LPCRECT pRectBounds, LPCRECT pRectLoc, LONG lCloseHint, DWORD *pHitResult)
Definition: activex.c:970
static HRESULT WINAPI PropertyNotifySink_OnChanged(IPropertyNotifySink *iface, DISPID dispID)
Definition: activex.c:2188
static HRESULT WINAPI OleInPlaceObject_GetWindow(IOleInPlaceObjectWindowless *iface, HWND *phwnd)
Definition: activex.c:1278
static void release_doc(IHTMLDocument2 *doc)
Definition: activex.c:2328
static ULONG WINAPI OleInPlaceObject_AddRef(IOleInPlaceObjectWindowless *iface)
Definition: activex.c:1268
static HRESULT WINAPI Dispatch_GetTypeInfoCount(IDispatch *iface, UINT *pctinfo)
Definition: activex.c:675
static void init_wrapped_iface(void)
Definition: activex.c:1399
static void _test_ifaces(unsigned line, IUnknown *iface, REFIID *iids)
Definition: activex.c:165
static HRESULT WINAPI PersistPropertyBag_Save(IPersistPropertyBag *face, IPropertyBag *pPropBag, BOOL fClearDisrty, BOOL fSaveAllProperties)
Definition: activex.c:641
static HRESULT WINAPI OleObject_QueryInterface(IOleObject *iface, REFIID riid, void **ppv)
Definition: activex.c:1004
static HRESULT WINAPI ViewObjectEx_GetExtent(IViewObjectEx *iface, DWORD dwDrawAspect, LONG lindex, DVTARGETDEVICE *ptd, LPSIZEL lpsizel)
Definition: activex.c:943
static IOleInPlaceFrame InPlaceFrame
Definition: activex.c:1864
static const IOleInPlaceSiteVtbl InPlaceSiteVtbl
Definition: activex.c:1971
static HRESULT WINAPI wrapped_func_nocall(IUnknown *iface, int i, double d)
Definition: activex.c:1384
static HRESULT WINAPI InPlaceSite_OnUIDeactivate(IOleInPlaceSite *iface, BOOL fUndoable)
Definition: activex.c:1946
static BOOL no_quickact
Definition: activex.c:102
static IQuickActivate QuickActivate
Definition: activex.c:516
static IOleClientSite ClientSite
Definition: activex.c:2054
static LONG activex_refcnt
Definition: activex.c:103
static HRESULT WINAPI InPlaceSite_CanInPlaceActivate(IOleInPlaceSite *iface)
Definition: activex.c:1907
static HRESULT WINAPI OleObject_EnumAdvise(IOleObject *iface, IEnumSTATDATA **ppenumAdvise)
Definition: activex.c:1211
static HWND plugin_hwnd
Definition: activex.c:100
static HRESULT WINAPI InPlaceFrame_GetWindow(IOleInPlaceFrame *iface, HWND *phwnd)
Definition: activex.c:1772
static HRESULT WINAPI ClientSite_ShowObject(IOleClientSite *iface)
Definition: activex.c:2024
static BOOL iface_cmp(IUnknown *iface1, IUnknown *iface2)
Definition: activex.c:149
static ULONG WINAPI ClientSite_AddRef(IOleClientSite *iface)
Definition: activex.c:1996
static ULONG WINAPI OleObject_AddRef(IOleObject *iface)
Definition: activex.c:1009
static HRESULT WINAPI ConnectionPointContainer_FindConnectionPoint(IConnectionPointContainer *iface, REFIID riid, IConnectionPoint **ppCP)
Definition: activex.c:858
static IDispatch * sink_disp
Definition: activex.c:199
static READYSTATE plugin_readystate
Definition: activex.c:200
static IOleObject OleObject
Definition: activex.c:1260
static IProvideClassInfo ProvideClassInfo
Definition: activex.c:834
static ULONG WINAPI Dispatch_Release(IDispatch *iface)
Definition: activex.c:670
static LRESULT WINAPI wnd_proc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
Definition: activex.c:2662
static HRESULT WINAPI ViewObjectEx_GetViewStatus(IViewObjectEx *iface, DWORD *pdwStatus)
Definition: activex.c:955
static IPersistPropertyBag PersistPropertyBag
Definition: activex.c:658
static HRESULT WINAPI OleInPlaceObjectWindowless_OnWindowMessage(IOleInPlaceObjectWindowless *iface, UINT msg, WPARAM wParam, LPARAM lParam, LRESULT *lpResult)
Definition: activex.c:1332
static HRESULT WINAPI InPlaceFrame_GetBorder(IOleInPlaceFrame *iface, LPRECT lprectBorder)
Definition: activex.c:1782
static IDispatch Dispatch
Definition: activex.c:801
static HRESULT WINAPI PersistPropertyBag_Load(IPersistPropertyBag *face, IPropertyBag *pPropBag, IErrorLog *pErrorLog)
Definition: activex.c:545
static HRESULT WINAPI QuickActivate_GetContentExtent(IQuickActivate *iface, LPSIZEL pSizel)
Definition: activex.c:501
static HRESULT WINAPI OleInPlaceObject_UIDeactivate(IOleInPlaceObjectWindowless *iface)
Definition: activex.c:1313
#define DISPID_SCRIPTPROP
Definition: activex.c:90
static HRESULT WINAPI InPlaceSite_OnInPlaceActivate(IOleInPlaceSite *iface)
Definition: activex.c:1912
static HRESULT WINAPI OleObject_GetMoniker(IOleObject *iface, DWORD dwAssign, DWORD dwWhichMoniker, IMoniker **ppmk)
Definition: activex.c:1059
static ULONG WINAPI PropertyNotifySink_AddRef(IPropertyNotifySink *iface)
Definition: activex.c:2178
static BOOL check_ie(void)
Definition: activex.c:2754
static ULONG WINAPI InPlaceFrame_Release(IOleInPlaceFrame *iface)
Definition: activex.c:1767
static HRESULT WINAPI InPlaceSite_ContextSensitiveHelp(IOleInPlaceSite *iface, BOOL fEnterMode)
Definition: activex.c:1901
static HRESULT WINAPI ConnectionPoint_GetConnectionInterface(IConnectionPoint *iface, IID *pIID)
Definition: activex.c:295
static HRESULT WINAPI ConnectionPointContainer_QueryInterface(IConnectionPointContainer *iface, REFIID riid, void **ppv)
Definition: activex.c:836
static HRESULT ax_qi(REFIID, void **)
Definition: activex.c:1413
static HRESULT WINAPI OleObject_GetClipboardData(IOleObject *iface, DWORD dwReserved, IDataObject **ppDataObject)
Definition: activex.c:1072
static HRESULT WINAPI ConnectionPointContainer_EnumConnectionPoints(IConnectionPointContainer *iface, IEnumConnectionPoints **ppEnum)
Definition: activex.c:851
static ULONG WINAPI ClientSite_Release(IOleClientSite *iface)
Definition: activex.c:2001
static HRESULT WINAPI ViewObjectEx_GetNaturalExtent(IViewObjectEx *iface, DWORD dwAspect, LONG lindex, DVTARGETDEVICE *ptd, HDC hicTargetDev, DVEXTENTINFO *pExtentIngo, LPSIZEL pSizel)
Definition: activex.c:977
static HRESULT WINAPI OleObject_GetExtent(IOleObject *iface, DWORD dwDrawAspect, SIZEL *psizel)
Definition: activex.c:1193
static ULONG WINAPI ProvideClassInfo_AddRef(IProvideClassInfo *iface)
Definition: activex.c:808
static HRESULT WINAPI ViewObjectEx_GetAdvise(IViewObjectEx *iface, DWORD *pAspects, DWORD *pAdvf, IAdviseSink **ppAdvSink)
Definition: activex.c:937
static void test_iface_wrapping(IHTMLObjectElement *elem)
Definition: activex.c:1540
static void test_nooleobj_ax(void)
Definition: activex.c:2574
static HRESULT WINAPI wrapped_QueryInterface(IUnknown *iface, REFIID riid, void **ppv)
Definition: activex.c:1365
static HRESULT WINAPI InPlaceFrame_SetActiveObject(IOleInPlaceFrame *iface, IOleInPlaceActiveObject *pActiveObject, LPCOLESTR pszObjName)
Definition: activex.c:1805
static HRESULT WINAPI Dispatch_Invoke(IDispatch *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
Definition: activex.c:711
static ULONG WINAPI DocumentSite_AddRef(IOleDocumentSite *iface)
Definition: activex.c:2061
static HRESULT WINAPI InPlaceFrame_ContextSensitiveHelp(IOleInPlaceFrame *iface, BOOL fEnterMode)
Definition: activex.c:1777
static const IOleInPlaceObjectWindowlessVtbl OleInPlaceObjectWindowlessVtbl
Definition: activex.c:1346
static HRESULT WINAPI OleObject_GetUserType(IOleObject *iface, DWORD dwFormOfType, LPOLESTR *pszUserType)
Definition: activex.c:1181
static void test_container(IHTMLDocument2 *doc_obj)
Definition: activex.c:1686
static HRESULT WINAPI PropertyNotifySink_OnRequestEdit(IPropertyNotifySink *iface, DISPID dispID)
Definition: activex.c:2208
static HRESULT cs_qi(REFIID, void **)
Definition: activex.c:2147
static HRESULT WINAPI ViewObjectEx_QueryHitPoint(IViewObjectEx *iface, DWORD dwAspect, LPCRECT pRectBounds, POINT ptlLoc, LONG lCloseHint, DWORD *pHitResult)
Definition: activex.c:963
static HRESULT WINAPI OleControl_OnAmbientPropertyChange(IOleControl *iface, DISPID dispID)
Definition: activex.c:392
static const IConnectionPointVtbl ConnectionPointVtbl
Definition: activex.c:350
static HRESULT WINAPI InPlaceSite_OnUIActivate(IOleInPlaceSite *iface)
Definition: activex.c:1917
static void set_plugin_readystate(READYSTATE state)
Definition: activex.c:203
static HRESULT WINAPI DocumentSite_QueryInterface(IOleDocumentSite *iface, REFIID riid, void **ppv)
Definition: activex.c:2056
#define TESTACTIVEX_CLSID
Definition: activex.c:105
static HRESULT WINAPI OleInPlaceObject_InPlaceDeactivate(IOleInPlaceObjectWindowless *iface)
Definition: activex.c:1296
@ TEST_FLASH
Definition: activex.c:94
@ TEST_NOQUICKACT
Definition: activex.c:95
@ TEST_DISPONLY
Definition: activex.c:96
static ULONG WINAPI OleObject_Release(IOleObject *iface)
Definition: activex.c:1014
static IHTMLDocument2 * create_document(void)
Definition: activex.c:2298
static HRESULT WINAPI OleObject_SetHostNames(IOleObject *iface, LPCOLESTR szContainerApp, LPCOLESTR szContainerObj)
Definition: activex.c:1039
static const GUID IID_ITestActiveX
Definition: activex.c:110
static HRESULT WINAPI OleControl_QueryInterface(IOleControl *iface, REFIID riid, void **ppv)
Definition: activex.c:365
static HRESULT WINAPI OleObject_GetUserClassID(IOleObject *iface, CLSID *pClsid)
Definition: activex.c:1175
static ULONG WINAPI PersistPropertyBag_Release(IPersistPropertyBag *iface)
Definition: activex.c:528
static void do_advise(IUnknown *unk, REFIID riid, IUnknown *unk_advise)
Definition: activex.c:2246
static HRESULT WINAPI InPlaceFrame_SetStatusText(IOleInPlaceFrame *iface, LPCOLESTR pszStatusText)
Definition: activex.c:1830
static IOleClientSite * client_site
Definition: activex.c:198
#define CHECK_EXPECT2(func)
Definition: activex.c:29
static HRESULT WINAPI ViewObjectEx_QueryInterface(IViewObjectEx *iface, REFIID riid, void **ppv)
Definition: activex.c:885
static HRESULT WINAPI InPlaceFrame_SetMenu(IOleInPlaceFrame *iface, HMENU hmenuShared, HOLEMENU holemenu, HWND hwndActiveObject)
Definition: activex.c:1817
static HRESULT WINAPI ClientSite_SaveObject(IOleClientSite *iface)
Definition: activex.c:2006
static HRESULT WINAPI InPlaceSite_GetWindow(IOleInPlaceSite *iface, HWND *phwnd)
Definition: activex.c:1895
static HRESULT WINAPI InPlaceSite_GetWindowContext(IOleInPlaceSite *iface, IOleInPlaceFrame **ppFrame, IOleInPlaceUIWindow **ppDoc, LPRECT lprcPosRect, LPRECT lprcClipRect, LPOLEINPLACEFRAMEINFO lpFrameInfo)
Definition: activex.c:1922
static LRESULT WINAPI plugin_proc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
Definition: activex.c:236
static HRESULT WINAPI OleObject_DoVerb(IOleObject *iface, LONG iVerb, LPMSG lpmsg, IOleClientSite *pActiveSite, LONG lindex, HWND hwndParent, LPCRECT lprcPosRect)
Definition: activex.c:1078
static void test_noquickact_ax(void)
Definition: activex.c:2460
static HRESULT WINAPI QuickActivate_QueryInterface(IQuickActivate *iface, REFIID riid, void **ppv)
Definition: activex.c:426
static HRESULT WINAPI Dispatch_GetTypeInfo(IDispatch *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
Definition: activex.c:681
static ULONG WINAPI OleControl_Release(IOleControl *iface)
Definition: activex.c:375
static HRESULT WINAPI ConnectionPoint_Unadvise(IConnectionPoint *iface, DWORD dwCookie)
Definition: activex.c:330
static ULONG WINAPI Dispatch_AddRef(IDispatch *iface)
Definition: activex.c:665
static HRESULT WINAPI QuickActivate_SetContentExtent(IQuickActivate *iface, LPSIZEL pSizel)
Definition: activex.c:495
static const IOleInPlaceFrameVtbl InPlaceUIWindowVtbl
Definition: activex.c:1866
static HWND container_hwnd
Definition: activex.c:100
static void test_flash_ax(void)
Definition: activex.c:2386
static HRESULT WINAPI OleObject_SetClientSite(IOleObject *iface, IOleClientSite *pClientSite)
Definition: activex.c:1019
static HRESULT WINAPI InPlaceSite_DeactivateAndUndo(IOleInPlaceSite *iface)
Definition: activex.c:1961
static ULONG WINAPI InPlaceSite_Release(IOleInPlaceSite *iface)
Definition: activex.c:1890
static IOleDocumentView * view
Definition: activex.c:1749
static ULONG WINAPI PropertyNotifySink_Release(IPropertyNotifySink *iface)
Definition: activex.c:2183
static const IDispatchVtbl DispatchVtbl
Definition: activex.c:791
static BOOL have_container
Definition: activex.c:201
static HRESULT WINAPI InPlaceSite_QueryInterface(IOleInPlaceSite *iface, REFIID riid, void **ppv)
Definition: activex.c:1880
static IOleControl OleControl
Definition: activex.c:424
static void load_typelib(void)
Definition: activex.c:2686
static void test_event_binding(void)
Definition: activex.c:2509
static ULONG WINAPI QuickActivate_Release(IQuickActivate *iface)
Definition: activex.c:436
static const IOleObjectVtbl OleObjectVtbl
Definition: activex.c:1233
static const char object_ax_str[]
Definition: activex.c:113
static void test_mon_displayname(IMoniker *mon, const char *exname, const char *broken_name)
Definition: activex.c:219
static HRESULT WINAPI OleObject_SetMoniker(IOleObject *iface, DWORD dwWhichMoniker, IMoniker *pmk)
Definition: activex.c:1053
static ULONG WINAPI wrapped_Release(IUnknown *iface)
Definition: activex.c:1378
static const IConnectionPointContainerVtbl ConnectionPointContainerVtbl
Definition: activex.c:875
#define test_ifaces(i, ids)
Definition: activex.c:164
static IOleInPlaceObjectWindowless OleInPlaceObjectWindowless
Definition: activex.c:1360
static HRESULT WINAPI InPlaceFrame_RemoveMenus(IOleInPlaceFrame *iface, HMENU hmenuShared)
Definition: activex.c:1824
static ULONG WINAPI ConnectionPointContainer_AddRef(IConnectionPointContainer *iface)
Definition: activex.c:841
static HRESULT WINAPI QuickActivate_QuickActivate(IQuickActivate *iface, QACONTAINER *container, QACONTROL *control)
Definition: activex.c:441
static IConnectionPoint ConnectionPoint
Definition: activex.c:361
static BOOL doc_complete
Definition: activex.c:2164
static void test_ui_activate(void)
Definition: activex.c:1732
static HRESULT WINAPI ViewObjectEx_Freeze(IViewObjectEx *iface, DWORD dwDrawAspect, LONG lindex, void *pvAspect, DWORD *pdwFreeze)
Definition: activex.c:914
static IUnknown wrapped_iface
Definition: activex.c:1363
static HRESULT WINAPI Dispatch_QueryInterface(IDispatch *iface, REFIID riid, void **ppv)
Definition: activex.c:660
static ULONG WINAPI OleInPlaceObject_Release(IOleInPlaceObjectWindowless *iface)
Definition: activex.c:1273
static HRESULT WINAPI Dispatch_GetIDsOfNames(IDispatch *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
Definition: activex.c:691
static void * wrapped_iface_vtbl[100]
Definition: activex.c:1362
static IConnectionPointContainer ConnectionPointContainer
Definition: activex.c:883
static HRESULT WINAPI ViewObjectEx_SetAdvise(IViewObjectEx *iface, DWORD aspects, DWORD advf, IAdviseSink *pAdvSink)
Definition: activex.c:926
static HRESULT WINAPI OleInPlaceObject_SetObjectRects(IOleInPlaceObjectWindowless *iface, LPCRECT lprcPosRect, LPCRECT lprcClipRect)
Definition: activex.c:1319
static ITypeInfo * class_typeinfo
Definition: activex.c:99
static IViewObjectEx ViewObjectEx
Definition: activex.c:1002
static HRESULT WINAPI OleObject_EnumVerbs(IOleObject *iface, IEnumOLEVERB **ppEnumOleVerb)
Definition: activex.c:1157
static void test_object_elem(IHTMLDocument2 *doc)
Definition: activex.c:1602
static HRESULT WINAPI OleObject_Update(IOleObject *iface)
Definition: activex.c:1163
static HRESULT WINAPI PersistPropertyBag_GetClassID(IPersistPropertyBag *face, CLSID *pClassID)
Definition: activex.c:533
static const IPersistPropertyBagVtbl PersistPropertyBagVtbl
Definition: activex.c:647
static void doc_load_string(IHTMLDocument2 *doc, const char *str)
Definition: activex.c:2224
static HRESULT WINAPI PropertyNotifySink_QueryInterface(IPropertyNotifySink *iface, REFIID riid, void **ppv)
Definition: activex.c:2166
static ULONG WINAPI OleControl_AddRef(IOleControl *iface)
Definition: activex.c:370
static IOleInPlaceSite InPlaceSite
Definition: activex.c:1989
static HRESULT WINAPI InPlaceFrame_TranslateAccelerator(IOleInPlaceFrame *iface, LPMSG lpmsg, WORD wID)
Definition: activex.c:1840
static HRESULT WINAPI OleObject_SetExtent(IOleObject *iface, DWORD dwDrawAspect, SIZEL *psizel)
Definition: activex.c:1187
static HRESULT WINAPI InPlaceFrame_QueryInterface(IOleInPlaceFrame *iface, REFIID riid, void **ppv)
Definition: activex.c:1751
static ULONG WINAPI ViewObjectEx_AddRef(IViewObjectEx *iface)
Definition: activex.c:890
static HRESULT WINAPI ClientSite_QueryInterface(IOleClientSite *iface, REFIID riid, void **ppv)
Definition: activex.c:1991
static HRESULT WINAPI ClientSite_GetMoniker(IOleClientSite *iface, DWORD dwAssign, DWORD dwWhichMoniker, IMoniker **ppmon)
Definition: activex.c:2012
static HRESULT WINAPI ViewObjectEx_GetColorSet(IViewObjectEx *iface, DWORD dwDrawAspect, LONG lindex, void *pvAspect, DVTARGETDEVICE *ptd, HDC hicTargetDev, LOGPALETTE **ppColorSet)
Definition: activex.c:907
static ULONG WINAPI ProvideClassInfo_Release(IProvideClassInfo *iface)
Definition: activex.c:813
static HRESULT WINAPI OleInPlaceObjectWindowless_ReactivateAndUndo(IOleInPlaceObjectWindowless *iface)
Definition: activex.c:1326
static void set_client_site(IHTMLDocument2 *doc, BOOL set)
Definition: activex.c:2265
static HRESULT WINAPI PersistPropertyBag_QueryInterface(IPersistPropertyBag *iface, REFIID riid, void **ppv)
Definition: activex.c:518
static HRESULT WINAPI ConnectionPoint_GetConnectionPointContainer(IConnectionPoint *iface, IConnectionPointContainer **ppCPC)
Definition: activex.c:301
static HRESULT WINAPI ProvideClassInfo_QueryInterface(IProvideClassInfo *iface, REFIID riid, void **ppv)
Definition: activex.c:803
static ULONG WINAPI InPlaceFrame_AddRef(IOleInPlaceFrame *iface)
Definition: activex.c:1762
static HRESULT WINAPI ConnectionPoint_EnumConnections(IConnectionPoint *iface, IEnumConnections **ppEnum)
Definition: activex.c:344
static ULONG WINAPI ConnectionPoint_AddRef(IConnectionPoint *iface)
Definition: activex.c:285
static HRESULT WINAPI InPlaceFrame_SetBorderSpace(IOleInPlaceFrame *iface, LPCBORDERWIDTHS pborderwidths)
Definition: activex.c:1793
static HWND create_container_window(void)
Definition: activex.c:2667
static HRESULT WINAPI ProvideClassInfo_GetClassInfo(IProvideClassInfo *iface, ITypeInfo **ppTI)
Definition: activex.c:818
static ULONG WINAPI ConnectionPointContainer_Release(IConnectionPointContainer *iface)
Definition: activex.c:846
static ULONG WINAPI PersistPropertyBag_AddRef(IPersistPropertyBag *iface)
Definition: activex.c:523
static HRESULT WINAPI ClientSite_OnShowWindow(IOleClientSite *iface, BOOL fShow)
Definition: activex.c:2030
static IHTMLDocument2 * notif_doc
Definition: activex.c:2163
static const IOleClientSiteVtbl ClientSiteVtbl
Definition: activex.c:2042
static HRESULT WINAPI OleObject_SetColorScheme(IOleObject *iface, LOGPALETTE *pLogpal)
Definition: activex.c:1227
static HRESULT WINAPI InPlaceSite_Scroll(IOleInPlaceSite *iface, SIZE scrollExtant)
Definition: activex.c:1941
static HRESULT WINAPI OleControl_OnMnemonic(IOleControl *iface, MSG *mMsg)
Definition: activex.c:386
static void test_event_call(void)
Definition: activex.c:2358
static HRESULT WINAPI ClientSite_GetContainer(IOleClientSite *iface, IOleContainer **ppContainer)
Definition: activex.c:2019
static HRESULT WINAPI PersistPropertyBag_InitNew(IPersistPropertyBag *face)
Definition: activex.c:539
static HRESULT WINAPI OleObject_Unadvise(IOleObject *iface, DWORD dwConnection)
Definition: activex.c:1205
static HRESULT WINAPI DocumentSite_ActivateMe(IOleDocumentSite *iface, IOleDocumentView *pViewToActivate)
Definition: activex.c:2071
static HRESULT WINAPI InPlaceSite_OnInPlaceDeactivate(IOleInPlaceSite *iface)
Definition: activex.c:1951
static HRESULT WINAPI OleObject_Close(IOleObject *iface, DWORD dwSaveOption)
Definition: activex.c:1045
static ULONG WINAPI ConnectionPoint_Release(IConnectionPoint *iface)
Definition: activex.c:290
static HRESULT WINAPI OleObject_GetClientSite(IOleObject *iface, IOleClientSite **ppClientSite)
Definition: activex.c:1033
static ULONG WINAPI ViewObjectEx_Release(IViewObjectEx *iface)
Definition: activex.c:895
static HRESULT WINAPI InPlaceFrame_RequestBorderSpace(IOleInPlaceFrame *iface, LPCBORDERWIDTHS pborderwidths)
Definition: activex.c:1787
static HRESULT WINAPI InPlaceSite_DiscardUndoState(IOleInPlaceSite *iface)
Definition: activex.c:1956
static const IOleControlVtbl OleControlVtbl
Definition: activex.c:414
static IPropertyNotifySink PropertyNotifySink
Definition: activex.c:2222
static HRESULT WINAPI OleObject_InitFromData(IOleObject *iface, IDataObject *pDataObject, BOOL fCreation, DWORD dwReserved)
Definition: activex.c:1065
static HRESULT WINAPI OleControl_GetControlInfo(IOleControl *iface, CONTROLINFO *pCI)
Definition: activex.c:380
static IHTMLDocument2 * create_doc(const char *str)
Definition: activex.c:2310
static void test_create_element(void)
Definition: activex.c:2616
static void create_plugin_window(HWND parent, const RECT *rect)
Definition: activex.c:260
static HRESULT WINAPI wrapped_func(IUnknown *iface, int i, double d)
Definition: activex.c:1390
static void test_exec_script(IHTMLDocument2 *doc, const char *codea, const char *langa)
Definition: activex.c:2595
static void test_elem_dispex(IDispatchEx *dispex)
Definition: activex.c:1509
static const IViewObjectExVtbl ViewObjectExVtbl
Definition: activex.c:984
#define DISPID_SCRIPTCALL
Definition: activex.c:91
static IHTMLWindow2 * window
Definition: events.c:77
#define todo_wine
Definition: custom.c:79
static const WCHAR sp[]
Definition: suminfo.c:287
static size_t elem
Definition: string.c:68
static const char mbstate_t *static wchar_t const char mbstate_t *static const wchar_t int *static double
Definition: string.c:80
static LPOLESTR
Definition: stg_prop.c:27
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:63
static VARIANTARG static DISPID
Definition: ordinal.c:52
static DWORD unk1
Definition: cursoricon.c:1638
#define DISPID_SECURITYCTX
Definition: mshtmdid.h:538
interface IHTMLWindow2 IHTMLWindow2
Definition: mshtmhst.idl:64
static BOOL is_ie_hardened(void)
Definition: mshtml_test.h:23
_In_ HANDLE _In_ DWORD _In_ DWORD _Inout_opt_ LPOVERLAPPED _In_opt_ LPTRANSMIT_FILE_BUFFERS _In_ DWORD dwReserved
Definition: mswsock.h:95
unsigned int UINT
Definition: ndis.h:50
#define LOCALE_NEUTRAL
@ REGCLS_MULTIPLEUSE
Definition: objbase.h:393
#define OLEIVERB_INPLACEACTIVATE
Definition: ole2.h:43
void WINAPI DECLSPEC_HOTPATCH SysFreeString(BSTR str)
Definition: oleaut.c:271
BSTR WINAPI SysAllocStringLen(const OLECHAR *str, unsigned int len)
Definition: oleaut.c:339
#define DISPATCH_METHOD
Definition: oleauto.h:1006
#define V_VT(A)
Definition: oleauto.h:211
#define V_BSTR(A)
Definition: oleauto.h:226
#define V_I4(A)
Definition: oleauto.h:247
#define DISPATCH_PROPERTYGET
Definition: oleauto.h:1007
#define CONNECT_E_NOCONNECTION
Definition: olectl.h:251
#define DISPID_ENABLED
Definition: olectl.h:362
#define DISPID_VALID
Definition: olectl.h:372
const GUID IID_IOleInPlaceSite
const GUID IID_IViewObject
const GUID IID_IConnectionPointContainer
const GUID IID_IPropertyNotifySink
const GUID IID_IProvideClassInfo
const GUID IID_IPropertyBag
const GUID IID_IAdviseSink
const GUID IID_IOleWindow
const GUID IID_IViewObject2
const GUID IID_IOleControlSite
const GUID IID_IOleClientSite
const GUID IID_IDispatch
const GUID IID_IOleInPlaceObject
const GUID IID_IOleObject
const GUID IID_IOleControl
const GUID IID_IPersistStreamInit
#define WS_CHILD
Definition: pedump.c:617
#define WS_OVERLAPPEDWINDOW
Definition: pedump.c:637
#define WS_VISIBLE
Definition: pedump.c:620
long LONG
Definition: pedump.c:60
#define WS_CLIPSIBLINGS
Definition: pedump.c:618
#define WS_CLIPCHILDREN
Definition: pedump.c:619
const GUID IID_IPersistPropertyBag
Definition: proxy.cpp:11
#define IsEqualGUID(rguid1, rguid2)
Definition: guiddef.h:147
#define REFIID
Definition: guiddef.h:118
#define IID_NULL
Definition: guiddef.h:98
const WCHAR * str
@ Close
Definition: sacdrv.h:268
DWORD LCID
Definition: nls.h:13
static __inline const char * wine_dbgstr_guid(const GUID *id)
Definition: debug.h:197
#define win_skip
Definition: test.h:160
int winetest_interactive
#define memset(x, y, z)
Definition: compat.h:39
static void init_test(void)
Definition: shlexec.c:2649
& rect
Definition: startmenu.cpp:1413
Definition: scsiwmi.h:51
Definition: windef.h:314
Definition: match.c:390
Definition: inflate.c:139
Definition: cookie.c:34
Definition: parser.c:49
Definition: mem.c:156
Definition: send.c:48
Definition: parse.h:23
TW_UINT32 TW_UINT16 TW_UINT16 MSG
Definition: twain.h:1829
ULONG_PTR SIZE_T
Definition: typedefs.h:80
uint32_t ULONG_PTR
Definition: typedefs.h:65
uint32_t ULONG
Definition: typedefs.h:59
HRESULT WINAPI DECLSPEC_HOTPATCH VariantClear(VARIANTARG *pVarg)
Definition: variant.c:648
static const WCHAR lang[]
Definition: wbemdisp.c:287
int ret
_In_ DWORD _Out_ _In_ WORD wFlags
Definition: wincon.h:531
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4023
LONG_PTR LPARAM
Definition: windef.h:208
LONG_PTR LRESULT
Definition: windef.h:209
UINT_PTR WPARAM
Definition: windef.h:207
#define HRESULT
Definition: msvc.h:7
#define WINAPI
Definition: msvc.h:6
#define E_NOINTERFACE
Definition: winerror.h:2364
#define DISP_E_MEMBERNOTFOUND
Definition: winerror.h:2512
#define E_UNEXPECTED
Definition: winerror.h:2456
#define DISP_E_TYPEMISMATCH
Definition: winerror.h:2514
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
Definition: dc.c:1539
BOOL WINAPI Rectangle(_In_ HDC, _In_ int, _In_ int, _In_ int, _In_ int)
HBRUSH WINAPI CreateSolidBrush(_In_ COLORREF)
#define HKEY_CLASSES_ROOT
Definition: winreg.h:10
static int init
Definition: wintirpc.c:33
#define WM_PAINT
Definition: winuser.h:1620
BOOL WINAPI TranslateMessage(_In_ const MSG *)
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
LRESULT WINAPI DefWindowProcW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
BOOL WINAPI GetMessageW(_Out_ LPMSG, _In_opt_ HWND, _In_ UINT, _In_ UINT)
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
BOOL WINAPI EndPaint(_In_ HWND, _In_ const PAINTSTRUCT *)
#define GetClassInfo
Definition: winuser.h:5779
ATOM WINAPI RegisterClassExW(_In_ CONST WNDCLASSEXW *)
#define CreateWindowW(a, b, c, d, e, f, g, h, i, j, k)
Definition: winuser.h:4316
#define CW_USEDEFAULT
Definition: winuser.h:225
LRESULT WINAPI DispatchMessageW(_In_ const MSG *)
struct _WNDCLASSEXW WNDCLASSEXW
#define SW_SHOW
Definition: winuser.h:775
HDC WINAPI BeginPaint(_In_ HWND, _Out_ LPPAINTSTRUCT)
BOOL WINAPI DestroyWindow(_In_ HWND)
_In_ USHORT _In_ ULONG _In_ PSOCKADDR _In_ PSOCKADDR _Reserved_ ULONG _In_opt_ PVOID _In_opt_ const WSK_CLIENT_CONNECTION_DISPATCH * Dispatch
Definition: wsk.h:188
__wchar_t WCHAR
Definition: xmlstorage.h:180
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
char CHAR
Definition: xmlstorage.h:175