Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
384d5bfd
Commit
384d5bfd
authored
Jan 29, 2024
by
Gabriel Ivăncescu
Committed by
Alexandre Julliard
Jan 30, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vbscript: Implement IActiveScriptSite service.
Signed-off-by:
Gabriel Ivăncescu
<
gabrielopcode@gmail.com
>
parent
62000c28
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
1 deletion
+23
-1
caller.c
dlls/vbscript/tests/caller.c
+13
-1
vbscript.c
dlls/vbscript/vbscript.c
+9
-0
vbscript.h
dlls/vbscript/vbscript.h
+1
-0
No files found.
dlls/vbscript/tests/caller.c
View file @
384d5bfd
...
@@ -74,6 +74,7 @@ extern const CLSID CLSID_VBScript;
...
@@ -74,6 +74,7 @@ extern const CLSID CLSID_VBScript;
expect_ ## func = called_ ## func = FALSE
expect_ ## func = called_ ## func = FALSE
DEFINE_EXPECT
(
sp_caller_QI_NULL
);
DEFINE_EXPECT
(
sp_caller_QI_NULL
);
DEFINE_EXPECT
(
site_QI_NULL
);
DEFINE_EXPECT
(
testGetCaller
);
DEFINE_EXPECT
(
testGetCaller
);
DEFINE_EXPECT
(
testGetCallerVBS
);
DEFINE_EXPECT
(
testGetCallerVBS
);
DEFINE_EXPECT
(
testGetCallerNested
);
DEFINE_EXPECT
(
testGetCallerNested
);
...
@@ -303,7 +304,9 @@ static HRESULT WINAPI Test_InvokeEx(IDispatchEx *iface, DISPID id, LCID lcid, WO
...
@@ -303,7 +304,9 @@ static HRESULT WINAPI Test_InvokeEx(IDispatchEx *iface, DISPID id, LCID lcid, WO
break
;
break
;
}
}
case
DISPID_TEST_TESTGETCALLERVBS
:
case
DISPID_TEST_TESTGETCALLERVBS
:
{
IUnknown
*
unk
;
CHECK_EXPECT
(
testGetCallerVBS
);
CHECK_EXPECT
(
testGetCallerVBS
);
ok
(
wFlags
==
DISPATCH_METHOD
,
"wFlags = %x
\n
"
,
wFlags
);
ok
(
wFlags
==
DISPATCH_METHOD
,
"wFlags = %x
\n
"
,
wFlags
);
...
@@ -318,7 +321,14 @@ static HRESULT WINAPI Test_InvokeEx(IDispatchEx *iface, DISPID id, LCID lcid, WO
...
@@ -318,7 +321,14 @@ static HRESULT WINAPI Test_InvokeEx(IDispatchEx *iface, DISPID id, LCID lcid, WO
hres
=
IServiceProvider_QueryService
(
pspCaller
,
&
SID_GetCaller
,
&
IID_IServiceProvider
,
(
void
**
)
&
caller
);
hres
=
IServiceProvider_QueryService
(
pspCaller
,
&
SID_GetCaller
,
&
IID_IServiceProvider
,
(
void
**
)
&
caller
);
ok
(
hres
==
E_NOINTERFACE
,
"QueryService(SID_GetCaller) returned: %08lx
\n
"
,
hres
);
ok
(
hres
==
E_NOINTERFACE
,
"QueryService(SID_GetCaller) returned: %08lx
\n
"
,
hres
);
ok
(
caller
==
NULL
,
"caller != NULL
\n
"
);
ok
(
caller
==
NULL
,
"caller != NULL
\n
"
);
SET_EXPECT
(
site_QI_NULL
);
hres
=
IServiceProvider_QueryService
(
pspCaller
,
&
IID_IActiveScriptSite
,
&
IID_NULL
,
(
void
**
)
&
unk
);
ok
(
hres
==
E_NOINTERFACE
,
"QueryService(IActiveScriptSite->NULL) returned: %08lx
\n
"
,
hres
);
ok
(
!
unk
,
"unk != NULL
\n
"
);
CHECK_CALLED
(
site_QI_NULL
);
break
;
break
;
}
case
DISPID_TEST_TESTGETCALLERNESTED
:
case
DISPID_TEST_TESTGETCALLERNESTED
:
CHECK_EXPECT
(
testGetCallerNested
);
CHECK_EXPECT
(
testGetCallerNested
);
...
@@ -374,6 +384,8 @@ static HRESULT WINAPI ActiveScriptSite_QueryInterface(IActiveScriptSite *iface,
...
@@ -374,6 +384,8 @@ static HRESULT WINAPI ActiveScriptSite_QueryInterface(IActiveScriptSite *iface,
}
else
if
(
IsEqualGUID
(
&
IID_IActiveScriptSite
,
riid
))
{
}
else
if
(
IsEqualGUID
(
&
IID_IActiveScriptSite
,
riid
))
{
*
ppv
=
iface
;
*
ppv
=
iface
;
}
else
{
}
else
{
if
(
IsEqualGUID
(
&
IID_NULL
,
riid
))
CHECK_EXPECT
(
site_QI_NULL
);
*
ppv
=
NULL
;
*
ppv
=
NULL
;
return
E_NOINTERFACE
;
return
E_NOINTERFACE
;
}
}
...
...
dlls/vbscript/vbscript.c
View file @
384d5bfd
...
@@ -421,6 +421,14 @@ static HRESULT WINAPI vbcaller_QueryService(IServiceProvider *iface, REFGUID gui
...
@@ -421,6 +421,14 @@ static HRESULT WINAPI vbcaller_QueryService(IServiceProvider *iface, REFGUID gui
{
{
struct
vbcaller
*
This
=
vbcaller_from_IServiceProvider
(
iface
);
struct
vbcaller
*
This
=
vbcaller_from_IServiceProvider
(
iface
);
if
(
IsEqualGUID
(
guidService
,
&
IID_IActiveScriptSite
))
{
TRACE
(
"(%p)->(IID_IActiveScriptSite)
\n
"
,
This
);
if
(
This
->
ctx
->
site
)
return
IActiveScriptSite_QueryInterface
(
This
->
ctx
->
site
,
riid
,
ppv
);
*
ppv
=
NULL
;
return
E_NOINTERFACE
;
}
if
(
IsEqualGUID
(
guidService
,
&
SID_GetCaller
))
{
if
(
IsEqualGUID
(
guidService
,
&
SID_GetCaller
))
{
TRACE
(
"(%p)->(SID_GetCaller)
\n
"
,
This
);
TRACE
(
"(%p)->(SID_GetCaller)
\n
"
,
This
);
*
ppv
=
NULL
;
*
ppv
=
NULL
;
...
@@ -1224,6 +1232,7 @@ HRESULT WINAPI VBScriptFactory_CreateInstance(IClassFactory *iface, IUnknown *pU
...
@@ -1224,6 +1232,7 @@ HRESULT WINAPI VBScriptFactory_CreateInstance(IClassFactory *iface, IUnknown *pU
return
E_OUTOFMEMORY
;
return
E_OUTOFMEMORY
;
}
}
vbcaller
->
ctx
=
ctx
;
ctx
->
vbcaller
=
vbcaller
;
ctx
->
vbcaller
=
vbcaller
;
ctx
->
safeopt
=
INTERFACE_USES_DISPEX
;
ctx
->
safeopt
=
INTERFACE_USES_DISPEX
;
list_init
(
&
ctx
->
objects
);
list_init
(
&
ctx
->
objects
);
...
...
dlls/vbscript/vbscript.h
View file @
384d5bfd
...
@@ -187,6 +187,7 @@ struct vbcaller {
...
@@ -187,6 +187,7 @@ struct vbcaller {
LONG
ref
;
LONG
ref
;
script_ctx_t
*
ctx
;
IServiceProvider
*
caller
;
IServiceProvider
*
caller
;
};
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment