ReactOS 0.4.15-dev-7889-g76290a6
activex.c
Go to the documentation of this file.
1/*
2 * Copyright 2009 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 <stdio.h>
20
21#define COBJMACROS
22#define CONST_VTABLE
23
24#include <ole2.h>
25#include <dispex.h>
26#include <activscp.h>
27#include <objsafe.h>
28#include <urlmon.h>
29#include <mshtmhst.h>
30
31#include "wine/test.h"
32
33#ifdef _WIN64
34
35#define IActiveScriptParse_QueryInterface IActiveScriptParse64_QueryInterface
36#define IActiveScriptParse_Release IActiveScriptParse64_Release
37#define IActiveScriptParse_InitNew IActiveScriptParse64_InitNew
38#define IActiveScriptParse_ParseScriptText IActiveScriptParse64_ParseScriptText
39#define IActiveScriptParseProcedure2_Release \
40 IActiveScriptParseProcedure2_64_Release
41#define IActiveScriptParseProcedure2_ParseProcedureText \
42 IActiveScriptParseProcedure2_64_ParseProcedureText
43
44#else
45
46#define IActiveScriptParse_QueryInterface IActiveScriptParse32_QueryInterface
47#define IActiveScriptParse_Release IActiveScriptParse32_Release
48#define IActiveScriptParse_InitNew IActiveScriptParse32_InitNew
49#define IActiveScriptParse_ParseScriptText IActiveScriptParse32_ParseScriptText
50#define IActiveScriptParseProcedure2_Release \
51 IActiveScriptParseProcedure2_32_Release
52#define IActiveScriptParseProcedure2_ParseProcedureText \
53 IActiveScriptParseProcedure2_32_ParseProcedureText
54
55#endif
56
57static const CLSID CLSID_JScript =
58 {0xf414c260,0x6ac0,0x11cf,{0xb6,0xd1,0x00,0xaa,0x00,0xbb,0xbb,0x58}};
59
60#define DEFINE_EXPECT(func) \
61 static BOOL expect_ ## func = FALSE, called_ ## func = FALSE
62
63#define SET_EXPECT(func) \
64 expect_ ## func = TRUE
65
66#define CHECK_EXPECT2(func) \
67 do { \
68 ok(expect_ ##func, "unexpected call " #func "\n"); \
69 called_ ## func = TRUE; \
70 }while(0)
71
72#define CHECK_EXPECT(func) \
73 do { \
74 CHECK_EXPECT2(func); \
75 expect_ ## func = FALSE; \
76 }while(0)
77
78#define CHECK_CALLED(func) \
79 do { \
80 ok(called_ ## func, "expected " #func "\n"); \
81 expect_ ## func = called_ ## func = FALSE; \
82 }while(0)
83
84DEFINE_EXPECT(CreateInstance);
85DEFINE_EXPECT(ProcessUrlAction);
86DEFINE_EXPECT(QueryCustomPolicy);
87DEFINE_EXPECT(reportSuccess);
88DEFINE_EXPECT(Host_QS_SecMgr);
89DEFINE_EXPECT(Caller_QS_SecMgr);
90DEFINE_EXPECT(QI_IObjectWithSite);
92
93static const WCHAR testW[] = {'t','e','s','t',0};
94
105
106#define TESTOBJ_CLSID "{178fc163-f585-4e24-9c13-4bb7faf80646}"
107
108static const GUID CLSID_TestObj =
109 {0x178fc163,0xf585,0x4e24,{0x9c,0x13,0x4b,0xb7,0xfa,0xf8,0x06,0x46}};
110
111/* Defined as extern in urlmon.idl, but not exported by uuid.lib */
113 {0x10200490,0xfa38,0x11d0,{0xac,0x0e,0x00,0xa0,0xc9,0xf,0xff,0xc0}};
114
115#define DISPID_TEST_REPORTSUCCESS 0x1000
116
117#define DISPID_GLOBAL_OK 0x2000
118
119static BSTR a2bstr(const char *str)
120{
121 BSTR ret;
122 int len;
123
124 len = MultiByteToWideChar(CP_ACP, 0, str, -1, NULL, 0);
127
128 return ret;
129}
130
131static int strcmp_wa(LPCWSTR strw, const char *stra)
132{
133 CHAR buf[512];
134 WideCharToMultiByte(CP_ACP, 0, strw, -1, buf, sizeof(buf), 0, 0);
135 return lstrcmpA(buf, stra);
136}
137
139{
140 ok(0, "unexpected call\n");
141 return E_NOTIMPL;
142}
143
145{
146 return 2;
147}
148
150{
151 return 1;
152}
153
155{
158
159
160 CHECK_EXPECT(SetSite);
161 ok(pUnkSite != NULL, "pUnkSite == NULL\n");
162
163 hres = IUnknown_QueryInterface(pUnkSite, &IID_IServiceProvider, (void**)&sp);
164 ok(hres == S_OK, "Could not get IServiceProvider iface: %08x\n", hres);
165 IServiceProvider_Release(sp);
166
167 return SetSite_hres;
168}
169
171{
172 ok(0, "unexpected call\n");
173 return E_NOTIMPL;
174}
175
176static const IObjectWithSiteVtbl ObjectWithSiteVtbl = {
182};
183
185
187
189{
190 *ppv = NULL;
191
193 *ppv = iface;
194 }else if(IsEqualGUID(riid, &IID_IDispatch) || IsEqualGUID(riid, &IID_IDispatchEx)) {
196 return QI_IDispatch_hres;
197 *ppv = iface;
199 CHECK_EXPECT(QI_IObjectWithSite);
201 }else if(IsEqualGUID(&IID_IObjectSafety, riid)) {
202 ok(0, "Unexpected IID_IObjectSafety query\n");
203 }
204
205 return *ppv ? S_OK : E_NOINTERFACE;
206}
207
209{
210 return 2;
211}
212
214{
215 return 1;
216}
217
219{
220 ok(0, "unexpected call\n");
221 return E_NOTIMPL;
222}
223
225 LCID lcid, ITypeInfo **ppTInfo)
226{
227 ok(0, "unexpected call\n");
228 return E_NOTIMPL;
229}
230
232 LPOLESTR *rgszNames, UINT cNames,
233 LCID lcid, DISPID *rgDispId)
234{
235 ok(0, "unexpected call\n");
236 return E_NOTIMPL;
237}
238
240 REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
241 VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
242{
243 ok(0, "unexpected call\n");
244 return E_NOTIMPL;
245}
246
248{
249 ok(0, "unexpected call %s %x\n", wine_dbgstr_w(bstrName), grfdex);
250 return E_NOTIMPL;
251}
252
254{
255 ok(0, "unexpected call\n");
256 return E_NOTIMPL;
257}
258
260{
261 ok(0, "unexpected call\n");
262 return E_NOTIMPL;
263}
264
266{
267 ok(0, "unexpected call\n");
268 return E_NOTIMPL;
269}
270
272{
273 ok(0, "unexpected call\n");
274 return E_NOTIMPL;
275}
276
278{
279 ok(0, "unexpected call\n");
280 return E_NOTIMPL;
281}
282
283static HRESULT WINAPI Test_GetDispID(IDispatchEx *iface, BSTR bstrName, DWORD grfdex, DISPID *pid)
284{
285 if(!strcmp_wa(bstrName, "reportSuccess")) {
286 ok(grfdex == fdexNameCaseSensitive, "grfdex = %x\n", grfdex);
288 return S_OK;
289 }
290
291 ok(0, "unexpected name %s\n", wine_dbgstr_w(bstrName));
292 return E_NOTIMPL;
293}
294
295static HRESULT WINAPI Test_InvokeEx(IDispatchEx *iface, DISPID id, LCID lcid, WORD wFlags, DISPPARAMS *pdp,
296 VARIANT *pvarRes, EXCEPINFO *pei, IServiceProvider *pspCaller)
297{
298 switch(id) {
300 CHECK_EXPECT(reportSuccess);
301
302 ok(wFlags == INVOKE_FUNC, "wFlags = %x\n", wFlags);
303 ok(pdp != NULL, "pdp == NULL\n");
304 ok(!pdp->rgdispidNamedArgs, "rgdispidNamedArgs != NULL\n");
305 ok(pdp->cArgs == 0, "cArgs = %d\n", pdp->cArgs);
306 ok(!pdp->cNamedArgs, "cNamedArgs = %d\n", pdp->cNamedArgs);
307 ok(!pvarRes, "pvarRes != NULL\n");
308 ok(pei != NULL, "pei == NULL\n");
309 break;
310
311 default:
312 ok(0, "unexpected call\n");
313 return E_NOTIMPL;
314 }
315
316 return S_OK;
317}
318
319static IDispatchExVtbl testObjVtbl = {
335};
336
338
339static HRESULT WINAPI Global_GetDispID(IDispatchEx *iface, BSTR bstrName, DWORD grfdex, DISPID *pid)
340{
341 if(!strcmp_wa(bstrName, "ok")) {
342 ok(grfdex == fdexNameCaseSensitive, "grfdex = %x\n", grfdex);
344 return S_OK;
345 }
346
347 ok(0, "unexpected name %s\n", wine_dbgstr_w(bstrName));
348 return E_NOTIMPL;
349}
350
351static HRESULT WINAPI Global_InvokeEx(IDispatchEx *iface, DISPID id, LCID lcid, WORD wFlags, DISPPARAMS *pdp,
352 VARIANT *pvarRes, EXCEPINFO *pei, IServiceProvider *pspCaller)
353{
354 switch(id) {
355 case DISPID_GLOBAL_OK:
356 ok(wFlags == INVOKE_FUNC || wFlags == (INVOKE_FUNC|INVOKE_PROPERTYGET), "wFlags = %x\n", wFlags);
357 ok(pdp != NULL, "pdp == NULL\n");
358 ok(pdp->rgvarg != NULL, "rgvarg == NULL\n");
359 ok(!pdp->rgdispidNamedArgs, "rgdispidNamedArgs != NULL\n");
360 ok(pdp->cArgs == 2, "cArgs = %d\n", pdp->cArgs);
361 ok(!pdp->cNamedArgs, "cNamedArgs = %d\n", pdp->cNamedArgs);
362 ok(pei != NULL, "pei == NULL\n");
363
364 ok(V_VT(pdp->rgvarg) == VT_BSTR, "V_VT(psp->rgvargs) = %d\n", V_VT(pdp->rgvarg));
365 ok(V_VT(pdp->rgvarg+1) == VT_BOOL, "V_VT(psp->rgvargs+1) = %d\n", V_VT(pdp->rgvarg));
366 ok(V_BOOL(pdp->rgvarg+1), "%s\n", wine_dbgstr_w(V_BSTR(pdp->rgvarg)));
367 break;
368
369 default:
370 ok(0, "unexpected call\n");
371 return E_NOTIMPL;
372 }
373
374 return S_OK;
375}
376
377static IDispatchExVtbl globalObjVtbl = {
393};
394
396
398{
400 *ppv = iface;
401 return S_OK;
402 }
403
404 /* TODO: IClassFactoryEx */
405 *ppv = NULL;
406 return E_NOINTERFACE;
407}
408
410{
411 return 2;
412}
413
415{
416 return 1;
417}
418
420{
421 CHECK_EXPECT(CreateInstance);
422
423 ok(!outer, "outer = %p\n", outer);
424 ok(IsEqualGUID(&IID_IUnknown, riid), "unexpected riid %s\n", wine_dbgstr_guid(riid));
425
427 *ppv = &testObj;
428 return CreateInstance_hres;
429}
430
432{
433 ok(0, "unexpected call\n");
434 return S_OK;
435}
436
437static const IClassFactoryVtbl ClassFactoryVtbl = {
443};
444
446
448{
449 ok(0, "unexpected call\n");
450 return E_NOINTERFACE;
451}
452
454{
455 return 2;
456}
457
459{
460 return 1;
461}
462
464 DWORD *pcbSecurityId, DWORD_PTR dwReserved)
465{
466 ok(0, "unexpected call\n");
467 return E_NOTIMPL;
468}
469
471 BYTE *pPolicy, DWORD cbPolicy, BYTE *pContext, DWORD cbContext, DWORD dwFlags, DWORD dwReserved)
472{
473 CHECK_EXPECT(ProcessUrlAction);
474
475 ok(dwAction == URLACTION_ACTIVEX_RUN, "dwAction = %x\n", dwAction);
476 ok(pPolicy != NULL, "pPolicy == NULL\n");
477 ok(cbPolicy == sizeof(DWORD), "cbPolicy = %d\n", cbPolicy);
478 ok(pContext != NULL, "pContext == NULL\n");
479 ok(cbContext == sizeof(GUID), "cbContext = %d\n", cbContext);
480 ok(IsEqualGUID(pContext, &CLSID_TestObj), "pContext = %s\n", wine_dbgstr_guid((const IID*)pContext));
481 ok(!dwFlags, "dwFlags = %x\n", dwFlags);
482 ok(!dwReserved, "dwReserved = %x\n", dwReserved);
483
485 *(DWORD*)pPolicy = ProcessUrlAction_policy;
487}
488
490 BYTE **ppPolicy, DWORD *pcbPolicy, BYTE *pContext, DWORD cbContext, DWORD dwReserved)
491{
492 const struct CONFIRMSAFETY *cs = (const struct CONFIRMSAFETY*)pContext;
493 DWORD *ret;
494
495 CHECK_EXPECT(QueryCustomPolicy);
496
497 ok(IsEqualGUID(&GUID_CUSTOM_CONFIRMOBJECTSAFETY, guidKey), "guidKey = %s\n", wine_dbgstr_guid(guidKey));
498
499 ok(ppPolicy != NULL, "ppPolicy == NULL\n");
500 ok(pcbPolicy != NULL, "pcbPolicy == NULL\n");
501 ok(pContext != NULL, "pContext == NULL\n");
502 ok(cbContext == sizeof(struct CONFIRMSAFETY), "cbContext = %d\n", cbContext);
503 ok(!dwReserved, "dwReserved = %x\n", dwReserved);
504
505 /* TODO: CLSID */
506 ok(cs->pUnk != NULL, "cs->pUnk == NULL\n");
507 ok(!cs->dwFlags, "dwFlags = %x\n", cs->dwFlags);
508
511
513 *ppPolicy = (BYTE*)ret;
514 *pcbPolicy = QueryCustomPolicy_psize;
516 if(QueryCustomPolicy_psize >= sizeof(DWORD))
518
520}
521
522static const IInternetHostSecurityManagerVtbl InternetHostSecurityManagerVtbl = {
529};
530
532
534
536{
537 ok(0, "unexpected call\n");
538 return E_NOINTERFACE;
539}
540
542{
543 return 2;
544}
545
547{
548 return 1;
549}
550
552 REFGUID guidService, REFIID riid, void **ppv)
553{
554 if(IsEqualGUID(&SID_GetCaller, guidService))
555 return E_NOINTERFACE;
556
557 if(IsEqualGUID(&SID_SInternetHostSecurityManager, guidService)) {
558 if(iface == &ServiceProvider)
559 CHECK_EXPECT(Host_QS_SecMgr);
560 else
561 CHECK_EXPECT(Caller_QS_SecMgr);
562 ok(IsEqualGUID(&IID_IInternetHostSecurityManager, riid), "unexpected riid %s\n", wine_dbgstr_guid(riid));
565 return QS_SecMgr_hres;
566 }
567
568 ok(0, "unexpected service %s\n", wine_dbgstr_guid(guidService));
569 return E_NOINTERFACE;
570}
571
572static IServiceProviderVtbl ServiceProviderVtbl = {
577};
578
581
583{
585 *ppv = iface;
586 }else if(IsEqualGUID(&IID_IActiveScriptSite, riid)) {
587 *ppv = iface;
588 }else if(IsEqualGUID(&IID_IServiceProvider, riid) && AllowIServiceProvider) {
590 }else {
591 *ppv = NULL;
592 return E_NOINTERFACE;
593 }
594
595 IUnknown_AddRef((IUnknown*)*ppv);
596 return S_OK;
597}
598
600{
601 return 2;
602}
603
605{
606 return 1;
607}
608
610{
611 *plcid = GetUserDefaultLCID();
612 return S_OK;
613}
614
616 DWORD dwReturnMask, IUnknown **ppiunkItem, ITypeInfo **ppti)
617{
618 ok(dwReturnMask == SCRIPTINFO_IUNKNOWN, "unexpected dwReturnMask %x\n", dwReturnMask);
619 ok(!ppti, "ppti != NULL\n");
620 ok(!strcmp_wa(pstrName, "test"), "pstrName = %s\n", wine_dbgstr_w(pstrName));
621
622 *ppiunkItem = (IUnknown*)&globalObj;
623 return S_OK;
624}
625
627{
628 return E_NOTIMPL;
629}
630
632 const VARIANT *pvarResult, const EXCEPINFO *pexcepinfo)
633{
634 return E_NOTIMPL;
635}
636
638{
639 return E_NOTIMPL;
640}
641
643{
644 return E_NOTIMPL;
645}
646
648{
649 return E_NOTIMPL;
650}
651
653{
654 return E_NOTIMPL;
655}
656
657#undef ACTSCPSITE_THIS
658
659static const IActiveScriptSiteVtbl ActiveScriptSiteVtbl = {
671};
672
674
675static void set_safety_options(IUnknown *unk, BOOL use_sec_mgr)
676{
677 IObjectSafety *safety;
678 DWORD supported, enabled, options_all, options_set;
680
681 hres = IUnknown_QueryInterface(unk, &IID_IObjectSafety, (void**)&safety);
682 ok(hres == S_OK, "Could not get IObjectSafety: %08x\n", hres);
683 if(FAILED(hres))
684 return;
685
686 options_all = INTERFACESAFE_FOR_UNTRUSTED_DATA|INTERFACE_USES_DISPEX|INTERFACE_USES_SECURITY_MANAGER;
687 if(use_sec_mgr)
688 options_set = options_all;
689 else
690 options_set = INTERFACE_USES_DISPEX;
691
692 hres = IObjectSafety_SetInterfaceSafetyOptions(safety, &IID_IActiveScriptParse, options_all, options_set);
693 ok(hres == S_OK, "SetInterfaceSafetyOptions failed: %08x\n", hres);
694
695 supported = enabled = 0xdeadbeef;
696 hres = IObjectSafety_GetInterfaceSafetyOptions(safety, &IID_IActiveScriptParse, &supported, &enabled);
697 ok(hres == S_OK, "GetInterfaceSafetyOptions failed: %08x\n", hres);
698 ok(supported == options_all, "supported=%x, expected %x\n", supported, options_all);
699 ok(enabled == options_set, "enabled=%x, expected %x\n", enabled, options_set);
700
701 IObjectSafety_Release(safety);
702}
703
704#define parse_script_a(p,s) _parse_script_a(__LINE__,p,s)
705static void _parse_script_a(unsigned line, IActiveScriptParse *parser, const char *script)
706{
707 BSTR str;
709
710 str = a2bstr(script);
713 ok_(__FILE__,line)(hres == S_OK, "ParseScriptText failed: %08x\n", hres);
714}
715
716static IActiveScriptParse *create_script(BOOL skip_tests, BOOL use_sec_mgr)
717{
718 IActiveScriptParse *parser;
721
724 ProcessUrlAction_policy = URLPOLICY_ALLOW;
728 QueryCustomPolicy_policy = URLPOLICY_ALLOW;
732
733 hres = CoCreateInstance(&CLSID_JScript, NULL, CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER,
734 &IID_IActiveScript, (void**)&script);
735 if(!skip_tests)
736 ok(hres == S_OK, "CoCreateInstance failed: %08x\n", hres);
737 if(FAILED(hres))
738 return NULL;
739
740 if(!skip_tests)
741 set_safety_options((IUnknown*)script, use_sec_mgr);
742
743 hres = IActiveScript_QueryInterface(script, &IID_IActiveScriptParse, (void**)&parser);
744 ok(hres == S_OK, "Could not get IActiveScriptParse: %08x\n", hres);
745
747 ok(hres == S_OK, "InitNew failed: %08x\n", hres);
748
749 hres = IActiveScript_SetScriptSite(script, &ActiveScriptSite);
750 ok(hres == S_OK, "SetScriptSite failed: %08x\n", hres);
751
752 hres = IActiveScript_AddNamedItem(script, testW,
753 SCRIPTITEM_ISVISIBLE|SCRIPTITEM_ISSOURCE|SCRIPTITEM_GLOBALMEMBERS);
754 ok(hres == S_OK, "AddNamedItem failed: %08x\n", hres);
755
756 hres = IActiveScript_SetScriptState(script, SCRIPTSTATE_STARTED);
757 ok(hres == S_OK, "SetScriptState(SCRIPTSTATE_STARTED) failed: %08x\n", hres);
758
759 IActiveScript_Release(script);
760
761 if(!skip_tests) {
763 "function testException(func, type, number) {\n"
764 " try {\n"
765 " func();\n"
766 " }catch(e) {\n"
767 " ok(e.name === type, 'e.name = ' + e.name + ', expected ' + type)\n"
768 " ok(e.number === number, 'e.number = ' + e.number + ', expected ' + number);\n"
769 " return;\n"
770 " }\n"
771 " ok(false, 'exception expected');\n"
772 "}");
773 }
774
775 return parser;
776}
777
778static IDispatchEx *parse_procedure_a(IActiveScriptParse *parser, const char *src)
779{
780 IActiveScriptParseProcedure2 *parse_proc;
781 IDispatchEx *dispex;
782 IDispatch *disp;
783 BSTR str;
785
786 hres = IActiveScriptParse_QueryInterface(parser, &IID_IActiveScriptParseProcedure2, (void**)&parse_proc);
787 ok(hres == S_OK, "Could not get IActiveScriptParseProcedure2: %08x\n", hres);
788
789 str = a2bstr(src);
793 ok(hres == S_OK, "ParseProcedureText failed: %08x\n", hres);
794 ok(disp != NULL, "disp == NULL\n");
795
796 hres = IDispatch_QueryInterface(disp, &IID_IDispatchEx, (void**)&dispex);
797 IDispatch_Release(disp);
798 ok(hres == S_OK, "Could not get IDispatchEx iface: %08x\n", hres);
799
800 return dispex;
801}
802
803#define call_procedure(p,c) _call_procedure(__LINE__,p,c)
804static void _call_procedure(unsigned line, IDispatchEx *proc, IServiceProvider *caller)
805{
806 DISPPARAMS dp = {NULL,NULL,0,0};
807 EXCEPINFO ei = {0};
809
810 hres = IDispatchEx_InvokeEx(proc, DISPID_VALUE, 0, DISPATCH_METHOD, &dp, NULL, &ei, caller);
811 ok_(__FILE__,line)(hres == S_OK, "InvokeEx failed: %08x\n", hres);
812
813}
814
815static void test_ActiveXObject(void)
816{
817 IActiveScriptParse *parser;
819
821
822 SET_EXPECT(Host_QS_SecMgr);
823 SET_EXPECT(ProcessUrlAction);
824 SET_EXPECT(CreateInstance);
825 SET_EXPECT(QueryCustomPolicy);
826 SET_EXPECT(QI_IObjectWithSite);
827 SET_EXPECT(reportSuccess);
828 parse_script_a(parser, "(new ActiveXObject('Wine.Test')).reportSuccess();");
829 CHECK_CALLED(Host_QS_SecMgr);
830 CHECK_CALLED(ProcessUrlAction);
831 CHECK_CALLED(CreateInstance);
832 CHECK_CALLED(QueryCustomPolicy);
833 CHECK_CALLED(QI_IObjectWithSite);
834 CHECK_CALLED(reportSuccess);
835
836 proc = parse_procedure_a(parser, "(new ActiveXObject('Wine.Test')).reportSuccess();");
837
838 SET_EXPECT(ProcessUrlAction);
839 SET_EXPECT(CreateInstance);
840 SET_EXPECT(QueryCustomPolicy);
841 SET_EXPECT(QI_IObjectWithSite);
842 SET_EXPECT(reportSuccess);
844 CHECK_CALLED(ProcessUrlAction);
845 CHECK_CALLED(CreateInstance);
846 CHECK_CALLED(QueryCustomPolicy);
847 CHECK_CALLED(QI_IObjectWithSite);
848 CHECK_CALLED(reportSuccess);
849
850 SET_EXPECT(ProcessUrlAction);
851 SET_EXPECT(CreateInstance);
852 SET_EXPECT(QueryCustomPolicy);
853 SET_EXPECT(QI_IObjectWithSite);
854 SET_EXPECT(reportSuccess);
856 CHECK_CALLED(ProcessUrlAction);
857 CHECK_CALLED(CreateInstance);
858 CHECK_CALLED(QueryCustomPolicy);
859 CHECK_CALLED(QI_IObjectWithSite);
860 CHECK_CALLED(reportSuccess);
861
862 IDispatchEx_Release(proc);
864
866 proc = parse_procedure_a(parser, "(new ActiveXObject('Wine.Test')).reportSuccess();");
867
868 SET_EXPECT(Host_QS_SecMgr);
869 SET_EXPECT(ProcessUrlAction);
870 SET_EXPECT(CreateInstance);
871 SET_EXPECT(QueryCustomPolicy);
872 SET_EXPECT(QI_IObjectWithSite);
873 SET_EXPECT(reportSuccess);
875 CHECK_CALLED(Host_QS_SecMgr);
876 CHECK_CALLED(ProcessUrlAction);
877 CHECK_CALLED(CreateInstance);
878 CHECK_CALLED(QueryCustomPolicy);
879 CHECK_CALLED(QI_IObjectWithSite);
880 CHECK_CALLED(reportSuccess);
881
882 parse_script_a(parser, "testException(function() { new ActiveXObject('Wine.TestABC'); }, 'Error', -2146827859);");
883
884 IDispatchEx_Release(proc);
886
889
890 SET_EXPECT(Host_QS_SecMgr);
891 parse_script_a(parser, "testException(function() { new ActiveXObject('Wine.Test'); }, 'Error', -2146827859);");
892 CHECK_CALLED(Host_QS_SecMgr);
893
895
898
899 SET_EXPECT(Host_QS_SecMgr);
900 SET_EXPECT(ProcessUrlAction);
901 parse_script_a(parser, "testException(function() { new ActiveXObject('Wine.Test'); }, 'Error', -2146827859);");
902 CHECK_CALLED(Host_QS_SecMgr);
903 CHECK_CALLED(ProcessUrlAction);
904
906
908 ProcessUrlAction_policy = URLPOLICY_DISALLOW;
909
910 SET_EXPECT(Host_QS_SecMgr);
911 SET_EXPECT(ProcessUrlAction);
912 parse_script_a(parser, "testException(function() { new ActiveXObject('Wine.Test'); }, 'Error', -2146827859);");
913 CHECK_CALLED(Host_QS_SecMgr);
914 CHECK_CALLED(ProcessUrlAction);
915
917
920
921 SET_EXPECT(Host_QS_SecMgr);
922 SET_EXPECT(ProcessUrlAction);
923 SET_EXPECT(CreateInstance);
924 parse_script_a(parser, "testException(function() { new ActiveXObject('Wine.Test'); }, 'Error', -2146827859);");
925 CHECK_CALLED(Host_QS_SecMgr);
926 CHECK_CALLED(ProcessUrlAction);
927 CHECK_CALLED(CreateInstance);
928
930
933
934 SET_EXPECT(Host_QS_SecMgr);
935 SET_EXPECT(ProcessUrlAction);
936 SET_EXPECT(CreateInstance);
937 SET_EXPECT(QueryCustomPolicy);
938 parse_script_a(parser, "testException(function() { new ActiveXObject('Wine.Test'); }, 'Error', -2146827859);");
939 CHECK_CALLED(Host_QS_SecMgr);
940 CHECK_CALLED(ProcessUrlAction);
941 CHECK_CALLED(CreateInstance);
942 CHECK_CALLED(QueryCustomPolicy);
943
945
948
949 SET_EXPECT(Host_QS_SecMgr);
950 SET_EXPECT(ProcessUrlAction);
951 SET_EXPECT(CreateInstance);
952 SET_EXPECT(QueryCustomPolicy);
953 SET_EXPECT(QI_IObjectWithSite);
954 SET_EXPECT(reportSuccess);
955 parse_script_a(parser, "(new ActiveXObject('Wine.Test')).reportSuccess();");
956 CHECK_CALLED(Host_QS_SecMgr);
957 CHECK_CALLED(ProcessUrlAction);
958 CHECK_CALLED(CreateInstance);
959 CHECK_CALLED(QueryCustomPolicy);
960 CHECK_CALLED(QI_IObjectWithSite);
961 CHECK_CALLED(reportSuccess);
962
964
966 QueryCustomPolicy_policy = URLPOLICY_DISALLOW;
967
968 SET_EXPECT(Host_QS_SecMgr);
969 SET_EXPECT(ProcessUrlAction);
970 SET_EXPECT(CreateInstance);
971 SET_EXPECT(QueryCustomPolicy);
972 parse_script_a(parser, "testException(function() { new ActiveXObject('Wine.Test'); }, 'Error', -2146827859);");
973 CHECK_CALLED(Host_QS_SecMgr);
974 CHECK_CALLED(ProcessUrlAction);
975 CHECK_CALLED(CreateInstance);
976 CHECK_CALLED(QueryCustomPolicy);
977
979
980 SET_EXPECT(ProcessUrlAction);
981 SET_EXPECT(CreateInstance);
982 SET_EXPECT(QueryCustomPolicy);
983 parse_script_a(parser, "testException(function() { new ActiveXObject('Wine.Test'); }, 'Error', -2146827859);");
984 CHECK_CALLED(ProcessUrlAction);
985 CHECK_CALLED(CreateInstance);
986 CHECK_CALLED(QueryCustomPolicy);
987
988 QueryCustomPolicy_policy = URLPOLICY_ALLOW;
990
991 SET_EXPECT(ProcessUrlAction);
992 SET_EXPECT(CreateInstance);
993 SET_EXPECT(QueryCustomPolicy);
994 parse_script_a(parser, "testException(function() { new ActiveXObject('Wine.Test'); }, 'Error', -2146827859);");
995 CHECK_CALLED(ProcessUrlAction);
996 CHECK_CALLED(CreateInstance);
997 CHECK_CALLED(QueryCustomPolicy);
998
1000
1002
1003 SET_EXPECT(CreateInstance);
1004 SET_EXPECT(QI_IObjectWithSite);
1005 SET_EXPECT(reportSuccess);
1006 parse_script_a(parser, "(new ActiveXObject('Wine.Test')).reportSuccess();");
1007 CHECK_CALLED(CreateInstance);
1008 CHECK_CALLED(QI_IObjectWithSite);
1009 CHECK_CALLED(reportSuccess);
1010
1012
1015
1016 SET_EXPECT(Host_QS_SecMgr);
1017 SET_EXPECT(ProcessUrlAction);
1018 SET_EXPECT(CreateInstance);
1019 SET_EXPECT(QueryCustomPolicy);
1020 SET_EXPECT(QI_IObjectWithSite);
1021 SET_EXPECT(SetSite);
1022 SET_EXPECT(reportSuccess);
1023 parse_script_a(parser, "(new ActiveXObject('Wine.Test')).reportSuccess();");
1024 CHECK_CALLED(Host_QS_SecMgr);
1025 CHECK_CALLED(ProcessUrlAction);
1026 CHECK_CALLED(CreateInstance);
1027 CHECK_CALLED(QueryCustomPolicy);
1028 CHECK_CALLED(QI_IObjectWithSite);
1029 CHECK_CALLED(SetSite);
1030 CHECK_CALLED(reportSuccess);
1031
1033 SET_EXPECT(ProcessUrlAction);
1034 SET_EXPECT(CreateInstance);
1035 SET_EXPECT(QueryCustomPolicy);
1036 SET_EXPECT(QI_IObjectWithSite);
1037 SET_EXPECT(SetSite);
1038 parse_script_a(parser, "testException(function() { new ActiveXObject('Wine.Test'); }, 'Error', -2146827859);");
1039 CHECK_CALLED(ProcessUrlAction);
1040 CHECK_CALLED(CreateInstance);
1041 CHECK_CALLED(QueryCustomPolicy);
1042 CHECK_CALLED(QI_IObjectWithSite);
1043 CHECK_CALLED(SetSite);
1044
1046
1047 /* No IServiceProvider Interface */
1051
1052 SET_EXPECT(CreateInstance);
1053 SET_EXPECT(QI_IObjectWithSite);
1054 SET_EXPECT(reportSuccess);
1055 SET_EXPECT(SetSite);
1056 parse_script_a(parser, "(new ActiveXObject('Wine.Test')).reportSuccess();");
1057 CHECK_CALLED(CreateInstance);
1058 CHECK_CALLED(QI_IObjectWithSite);
1059 CHECK_CALLED(reportSuccess);
1060 CHECK_CALLED(SetSite);
1061
1063
1067
1068 parse_script_a(parser, "testException(function() { new ActiveXObject('Wine.Test'); }, 'Error', -2146827859);");
1069
1071}
1072
1073static BOOL init_key(const char *key_name, const char *def_value, BOOL init)
1074{
1075 HKEY hkey;
1076 DWORD res;
1077
1078 if(!init) {
1080 return TRUE;
1081 }
1082
1084 if(res != ERROR_SUCCESS)
1085 return FALSE;
1086
1087 if(def_value)
1088 res = RegSetValueA(hkey, NULL, REG_SZ, def_value, strlen(def_value));
1089
1090 RegCloseKey(hkey);
1091
1092 return res == ERROR_SUCCESS;
1093}
1094
1096{
1097 return init_key("Wine.Test\\CLSID", TESTOBJ_CLSID, init);
1098}
1099
1101{
1102 DWORD regid;
1103 HRESULT hres;
1104
1105 if(!init_registry(TRUE)) {
1107 return FALSE;
1108 }
1109
1111 CLSCTX_INPROC_SERVER, REGCLS_MULTIPLEUSE, &regid);
1112 ok(hres == S_OK, "Could not register script engine: %08x\n", hres);
1113
1114 return TRUE;
1115}
1116
1118{
1119 IActiveScriptProperty *script_prop;
1120 IActiveScriptParse *parser;
1121 BSTR str;
1122 HRESULT hres;
1123
1125 if(!parser)
1126 return FALSE;
1127
1128 str = a2bstr("if(!('localeCompare' in String.prototype)) throw 1;");
1131
1132 if(hres == S_OK)
1133 hres = IActiveScriptParse_QueryInterface(parser, &IID_IActiveScriptProperty, (void**)&script_prop);
1135 if(hres == S_OK)
1136 IActiveScriptProperty_Release(script_prop);
1137
1138 return hres == S_OK;
1139}
1140
1142{
1144
1145 if(check_jscript()) {
1146 if(register_activex()) {
1149 }else {
1150 skip("Could not register ActiveX object\n");
1151 }
1152 }else {
1153 win_skip("Broken engine, probably too old\n");
1154 }
1155
1157}
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
@ SCRIPTSTATE_STARTED
Definition: activscp.idl:58
enum tagSCRIPTSTATE SCRIPTSTATE
#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
const GUID IID_IUnknown
const GUID IID_IClassFactory
#define RegCloseKey(hKey)
Definition: registry.h:49
static IActiveScriptParse * create_script(void)
Definition: caller.c:501
#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:4954
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 WideCharToMultiByte
Definition: compat.h:111
#define MultiByteToWideChar
Definition: compat.h:110
@ VT_BSTR
Definition: compat.h:2303
@ VT_BOOL
Definition: compat.h:2306
const GUID GUID_CUSTOM_CONFIRMOBJECTSAFETY
Definition: activex.c:29
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
#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
GLenum GLenum GLsizei const GLuint GLboolean enabled
Definition: glext.h:7750
GLuint res
Definition: glext.h:9613
GLenum src
Definition: glext.h:6340
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
GLenum GLsizei len
Definition: glext.h:6722
#define cs
Definition: i386-dis.c:442
LPVOID WINAPI CoTaskMemAlloc(SIZE_T size)
Definition: ifs.c:426
REFIID riid
Definition: atlbase.h:39
REFIID LPVOID * ppv
Definition: atlbase.h:39
#define S_OK
Definition: intsafe.h:52
#define SUCCEEDED(hr)
Definition: intsafe.h:50
#define FAILED(hr)
Definition: intsafe.h:51
#define wine_dbgstr_w
Definition: kernel32.h:34
LCID WINAPI GetUserDefaultLCID(void)
Definition: lang.c:778
#define REG_SZ
Definition: layer.c:22
int WINAPI lstrcmpA(LPCSTR lpString1, LPCSTR lpString2)
Definition: lstring.c:18
const IID IID_IObjectWithSite
HRESULT hres
Definition: protocol.c:465
static HRESULT WINAPI ServiceProvider_QueryService(IServiceProvider *iface, REFGUID guidService, REFIID riid, void **ppv)
Definition: activex.c:551
static BOOL check_jscript(void)
Definition: activex.c:1117
#define SET_EXPECT(func)
Definition: activex.c:63
static ULONG WINAPI ActiveScriptSite_Release(IActiveScriptSite *iface)
Definition: activex.c:604
static HRESULT WINAPI ClassFactory_CreateInstance(IClassFactory *iface, IUnknown *outer, REFIID riid, void **ppv)
Definition: activex.c:419
static ULONG WINAPI ObjectWithSite_Release(IObjectWithSite *iface)
Definition: activex.c:149
static HRESULT CreateInstance_hres
Definition: activex.c:98
static HRESULT WINAPI ActiveScriptSite_OnLeaveScript(IActiveScriptSite *iface)
Definition: activex.c:652
static IServiceProvider caller_sp
Definition: activex.c:580
static void set_safety_options(IUnknown *unk, BOOL use_sec_mgr)
Definition: activex.c:675
static IClassFactory activex_cf
Definition: activex.c:445
static ULONG WINAPI ObjectWithSite_AddRef(IObjectWithSite *iface)
Definition: activex.c:144
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 IDispatchExVtbl globalObjVtbl
Definition: activex.c:377
static IInternetHostSecurityManager InternetHostSecurityManager
Definition: activex.c:531
static const IObjectWithSiteVtbl ObjectWithSiteVtbl
Definition: activex.c:176
static const GUID CLSID_TestObj
Definition: activex.c:108
static HRESULT WINAPI ActiveScriptSite_OnStateChange(IActiveScriptSite *iface, SCRIPTSTATE ssScriptState)
Definition: activex.c:637
#define parse_script_a(p, s)
Definition: activex.c:704
static const IClassFactoryVtbl ClassFactoryVtbl
Definition: activex.c:437
static HRESULT WINAPI DispatchEx_GetMemberProperties(IDispatchEx *iface, DISPID id, DWORD grfdexFetch, DWORD *pgrfdex)
Definition: activex.c:259
static HRESULT WINAPI InternetHostSecurityManager_QueryInterface(IInternetHostSecurityManager *iface, REFIID riid, void **ppv)
Definition: activex.c:447
static ULONG WINAPI InternetHostSecurityManager_AddRef(IInternetHostSecurityManager *iface)
Definition: activex.c:453
static ULONG WINAPI DispatchEx_Release(IDispatchEx *iface)
Definition: activex.c:213
static const WCHAR testW[]
Definition: activex.c:93
static DWORD ProcessUrlAction_policy
Definition: activex.c:97
static HRESULT WINAPI DispatchEx_GetIDsOfNames(IDispatchEx *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
Definition: activex.c:231
static BOOL init_registry(BOOL init)
Definition: activex.c:1095
static const CLSID CLSID_JScript
Definition: activex.c:57
static HRESULT WINAPI DispatchEx_DeleteMemberByDispID(IDispatchEx *iface, DISPID id)
Definition: activex.c:253
static HRESULT WINAPI InternetHostSecurityManager_GetSecurityId(IInternetHostSecurityManager *iface, BYTE *pbSecurityId, DWORD *pcbSecurityId, DWORD_PTR dwReserved)
Definition: activex.c:463
static HRESULT WINAPI DispatchEx_GetNameSpaceParent(IDispatchEx *iface, IUnknown **ppunk)
Definition: activex.c:277
static IObjectWithSite ObjectWithSite
Definition: activex.c:184
static HRESULT WINAPI DispatchEx_Invoke(IDispatchEx *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
Definition: activex.c:239
#define IActiveScriptParseProcedure2_ParseProcedureText
Definition: activex.c:52
static void test_ActiveXObject(void)
Definition: activex.c:815
static void _parse_script_a(unsigned line, IActiveScriptParse *parser, const char *script)
Definition: activex.c:705
#define CHECK_EXPECT(func)
Definition: activex.c:72
#define call_procedure(p, c)
Definition: activex.c:803
static HRESULT WINAPI ActiveScriptSite_GetDocVersionString(IActiveScriptSite *iface, BSTR *pbstrVersion)
Definition: activex.c:626
static HRESULT WINAPI InternetHostSecurityManager_QueryCustomPolicy(IInternetHostSecurityManager *iface, REFGUID guidKey, BYTE **ppPolicy, DWORD *pcbPolicy, BYTE *pContext, DWORD cbContext, DWORD dwReserved)
Definition: activex.c:489
static HRESULT WINAPI ActiveScriptSite_GetItemInfo(IActiveScriptSite *iface, LPCOLESTR pstrName, DWORD dwReturnMask, IUnknown **ppiunkItem, ITypeInfo **ppti)
Definition: activex.c:615
static ULONG WINAPI ClassFactory_Release(IClassFactory *iface)
Definition: activex.c:414
#define DEFINE_EXPECT(func)
Definition: activex.c:60
static HRESULT WINAPI DispatchEx_GetMemberName(IDispatchEx *iface, DISPID id, BSTR *pbstrName)
Definition: activex.c:265
static DWORD QueryCustomPolicy_policy
Definition: activex.c:101
#define IActiveScriptParse_InitNew
Definition: activex.c:48
#define IActiveScriptParse_ParseScriptText
Definition: activex.c:49
#define IActiveScriptParseProcedure2_Release
Definition: activex.c:50
#define IActiveScriptParse_Release
Definition: activex.c:47
static BSTR a2bstr(const char *str)
Definition: activex.c:119
#define DISPID_GLOBAL_OK
Definition: activex.c:117
static int strcmp_wa(LPCWSTR strw, const char *stra)
Definition: activex.c:131
static BOOL AllowIServiceProvider
Definition: activex.c:104
static IServiceProvider ServiceProvider
Definition: activex.c:533
static HRESULT WINAPI ObjectWithSite_QueryInterface(IObjectWithSite *iface, REFIID riid, void **ppv)
Definition: activex.c:138
static BOOL init_key(const char *key_name, const char *def_value, BOOL init)
Definition: activex.c:1073
static HRESULT WINAPI DispatchEx_GetNextDispID(IDispatchEx *iface, DWORD grfdex, DISPID id, DISPID *pid)
Definition: activex.c:271
static HRESULT WINAPI Test_GetDispID(IDispatchEx *iface, BSTR bstrName, DWORD grfdex, DISPID *pid)
Definition: activex.c:283
#define IActiveScriptParse_QueryInterface
Definition: activex.c:46
static HRESULT WINAPI DispatchEx_QueryInterface(IDispatchEx *iface, REFIID riid, void **ppv)
Definition: activex.c:188
static void _call_procedure(unsigned line, IDispatchEx *proc, IServiceProvider *caller)
Definition: activex.c:804
static HRESULT WINAPI ClassFactory_QueryInterface(IClassFactory *iface, REFIID riid, void **ppv)
Definition: activex.c:397
static IDispatchEx * parse_procedure_a(IActiveScriptParse *parser, const char *src)
Definition: activex.c:778
static HRESULT WINAPI ActiveScriptSite_QueryInterface(IActiveScriptSite *iface, REFIID riid, void **ppv)
Definition: activex.c:582
static ULONG WINAPI InternetHostSecurityManager_Release(IInternetHostSecurityManager *iface)
Definition: activex.c:458
static HRESULT QI_IDispatch_hres
Definition: activex.c:102
static HRESULT WINAPI ActiveScriptSite_OnEnterScript(IActiveScriptSite *iface)
Definition: activex.c:647
static HRESULT ProcessUrlAction_hres
Definition: activex.c:96
static ULONG WINAPI DispatchEx_AddRef(IDispatchEx *iface)
Definition: activex.c:208
#define CHECK_CALLED(func)
Definition: activex.c:78
static ULONG WINAPI ActiveScriptSite_AddRef(IActiveScriptSite *iface)
Definition: activex.c:599
#define TESTOBJ_CLSID
Definition: activex.c:106
static HRESULT WINAPI ActiveScriptSite_OnScriptTerminate(IActiveScriptSite *iface, const VARIANT *pvarResult, const EXCEPINFO *pexcepinfo)
Definition: activex.c:631
static HRESULT QS_SecMgr_hres
Definition: activex.c:95
static ULONG WINAPI ClassFactory_AddRef(IClassFactory *iface)
Definition: activex.c:409
static HRESULT WINAPI ObjectWithSite_SetSite(IObjectWithSite *iface, IUnknown *pUnkSite)
Definition: activex.c:154
static const IInternetHostSecurityManagerVtbl InternetHostSecurityManagerVtbl
Definition: activex.c:522
static DWORD QueryCustomPolicy_psize
Definition: activex.c:100
static BOOL register_activex(void)
Definition: activex.c:1100
static HRESULT WINAPI DispatchEx_GetTypeInfo(IDispatchEx *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
Definition: activex.c:224
static IDispatchEx globalObj
Definition: activex.c:395
static HRESULT WINAPI ServiceProvider_QueryInterface(IServiceProvider *iface, REFIID riid, void **ppv)
Definition: activex.c:535
static IDispatchEx testObj
Definition: activex.c:337
static HRESULT WINAPI InternetHostSecurityManager_ProcessUrlAction(IInternetHostSecurityManager *iface, DWORD dwAction, BYTE *pPolicy, DWORD cbPolicy, BYTE *pContext, DWORD cbContext, DWORD dwFlags, DWORD dwReserved)
Definition: activex.c:470
static const IActiveScriptSiteVtbl ActiveScriptSiteVtbl
Definition: activex.c:659
static IServiceProviderVtbl ServiceProviderVtbl
Definition: activex.c:572
static HRESULT WINAPI Global_InvokeEx(IDispatchEx *iface, DISPID id, LCID lcid, WORD wFlags, DISPPARAMS *pdp, VARIANT *pvarRes, EXCEPINFO *pei, IServiceProvider *pspCaller)
Definition: activex.c:351
static HRESULT WINAPI DispatchEx_DeleteMemberByName(IDispatchEx *iface, BSTR bstrName, DWORD grfdex)
Definition: activex.c:247
static ULONG WINAPI ServiceProvider_AddRef(IServiceProvider *iface)
Definition: activex.c:541
static HRESULT QueryCustomPolicy_hres
Definition: activex.c:99
static HRESULT WINAPI ActiveScriptSite_GetLCID(IActiveScriptSite *iface, LCID *plcid)
Definition: activex.c:609
static IActiveScriptSite ActiveScriptSite
Definition: activex.c:673
static HRESULT WINAPI ActiveScriptSite_OnScriptError(IActiveScriptSite *iface, IActiveScriptError *pscripterror)
Definition: activex.c:642
static HRESULT WINAPI DispatchEx_GetTypeInfoCount(IDispatchEx *iface, UINT *pctinfo)
Definition: activex.c:218
static IObjectWithSite * object_with_site
Definition: activex.c:186
static IDispatchExVtbl testObjVtbl
Definition: activex.c:319
#define DISPID_TEST_REPORTSUCCESS
Definition: activex.c:115
static HRESULT WINAPI ObjectWithSite_GetSite(IObjectWithSite *iface, REFIID riid, void **ppvSite)
Definition: activex.c:170
static HRESULT SetSite_hres
Definition: activex.c:103
static HRESULT WINAPI Test_InvokeEx(IDispatchEx *iface, DISPID id, LCID lcid, WORD wFlags, DISPPARAMS *pdp, VARIANT *pvarRes, EXCEPINFO *pei, IServiceProvider *pspCaller)
Definition: activex.c:295
static HRESULT WINAPI Global_GetDispID(IDispatchEx *iface, BSTR bstrName, DWORD grfdex, DISPID *pid)
Definition: activex.c:339
static const char * strw(LPCWSTR x)
Definition: actctx.c:49
static const WCHAR sp[]
Definition: suminfo.c:287
static LPOLESTR
Definition: stg_prop.c:27
static VARIANTARG static DISPID
Definition: ordinal.c:52
script
Definition: msipriv.h:383
_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 DWORD
Definition: nt_native.h:44
@ REGCLS_MULTIPLEUSE
Definition: objbase.h:393
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 V_BOOL(A)
Definition: oleauto.h:224
#define DISPATCH_METHOD
Definition: oleauto.h:1006
#define V_VT(A)
Definition: oleauto.h:211
#define V_BSTR(A)
Definition: oleauto.h:226
const GUID IID_IDispatch
static HANDLE proc()
Definition: pdb.c:34
#define IsEqualGUID(rguid1, rguid2)
Definition: guiddef.h:147
#define REFIID
Definition: guiddef.h:118
const WCHAR * str
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
#define memset(x, y, z)
Definition: compat.h:39
Definition: scsiwmi.h:51
Definition: parser.c:49
Definition: import.c:81
uint32_t DWORD_PTR
Definition: typedefs.h:65
uint32_t ULONG
Definition: typedefs.h:59
int ret
_In_ DWORD _Out_ _In_ WORD wFlags
Definition: wincon.h:531
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1176
_In_ ULONG_PTR _In_ ULONG _Out_ ULONG_PTR * pid
Definition: winddi.h:3837
#define WINAPI
Definition: msvc.h:6
#define E_NOINTERFACE
Definition: winerror.h:2364
#define HKEY_CLASSES_ROOT
Definition: winreg.h:10
static int init
Definition: wintirpc.c:33
__wchar_t WCHAR
Definition: xmlstorage.h:180
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
char CHAR
Definition: xmlstorage.h:175
unsigned char BYTE
Definition: xxhash.c:193