Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
4c4006d3
Commit
4c4006d3
authored
Sep 20, 2019
by
Jacek Caban
Committed by
Alexandre Julliard
Sep 20, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
scrobj: Add IServiceProvider stub implementation.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
98b63dc8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
45 additions
and
0 deletions
+45
-0
scrobj.c
dlls/scrobj/scrobj.c
+45
-0
No files found.
dlls/scrobj/scrobj.c
View file @
4c4006d3
...
...
@@ -86,6 +86,7 @@ struct script_host
{
IActiveScriptSite
IActiveScriptSite_iface
;
IActiveScriptSiteWindow
IActiveScriptSiteWindow_iface
;
IServiceProvider
IServiceProvider_iface
;
LONG
ref
;
struct
list
entry
;
WCHAR
*
language
;
...
...
@@ -199,6 +200,11 @@ static HRESULT WINAPI ActiveScriptSite_QueryInterface(IActiveScriptSite *iface,
TRACE
(
"(%p)->(IID_IActiveScriptSiteWindow %p)
\n
"
,
This
,
ppv
);
*
ppv
=
&
This
->
IActiveScriptSiteWindow_iface
;
}
else
if
(
IsEqualGUID
(
&
IID_IServiceProvider
,
riid
))
{
TRACE
(
"(%p)->(IID_IServiceProvider %p)
\n
"
,
This
,
ppv
);
*
ppv
=
&
This
->
IServiceProvider_iface
;
}
else
{
FIXME
(
"(%p)->(%s %p)
\n
"
,
This
,
debugstr_guid
(
riid
),
ppv
);
...
...
@@ -355,6 +361,44 @@ static const IActiveScriptSiteWindowVtbl ActiveScriptSiteWindowVtbl = {
ActiveScriptSiteWindow_EnableModeless
};
static
inline
struct
script_host
*
impl_from_IServiceProvider
(
IServiceProvider
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
struct
script_host
,
IServiceProvider_iface
);
}
static
HRESULT
WINAPI
ServiceProvider_QueryInterface
(
IServiceProvider
*
iface
,
REFIID
riid
,
void
**
obj
)
{
struct
script_host
*
This
=
impl_from_IServiceProvider
(
iface
);
return
IActiveScriptSite_QueryInterface
(
&
This
->
IActiveScriptSite_iface
,
riid
,
obj
);
}
static
ULONG
WINAPI
ServiceProvider_AddRef
(
IServiceProvider
*
iface
)
{
struct
script_host
*
This
=
impl_from_IServiceProvider
(
iface
);
return
IActiveScriptSite_AddRef
(
&
This
->
IActiveScriptSite_iface
);
}
static
ULONG
WINAPI
ServiceProvider_Release
(
IServiceProvider
*
iface
)
{
struct
script_host
*
This
=
impl_from_IServiceProvider
(
iface
);
return
IActiveScriptSite_Release
(
&
This
->
IActiveScriptSite_iface
);
}
static
HRESULT
WINAPI
ServiceProvider_QueryService
(
IServiceProvider
*
iface
,
REFGUID
service
,
REFIID
riid
,
void
**
obj
)
{
struct
script_host
*
This
=
impl_from_IServiceProvider
(
iface
);
FIXME
(
"(%p)->(%s %s %p)
\n
"
,
This
,
debugstr_guid
(
service
),
debugstr_guid
(
riid
),
obj
);
return
E_NOTIMPL
;
}
static
const
IServiceProviderVtbl
ServiceProviderVtbl
=
{
ServiceProvider_QueryInterface
,
ServiceProvider_AddRef
,
ServiceProvider_Release
,
ServiceProvider_QueryService
};
static
struct
script_host
*
find_script_host
(
struct
list
*
hosts
,
const
WCHAR
*
language
)
{
struct
script_host
*
host
;
...
...
@@ -373,6 +417,7 @@ static HRESULT create_script_host(const WCHAR *language, struct list *hosts)
host
->
IActiveScriptSite_iface
.
lpVtbl
=
&
ActiveScriptSiteVtbl
;
host
->
IActiveScriptSiteWindow_iface
.
lpVtbl
=
&
ActiveScriptSiteWindowVtbl
;
host
->
IServiceProvider_iface
.
lpVtbl
=
&
ServiceProviderVtbl
;
host
->
ref
=
1
;
if
(
!
(
host
->
language
=
heap_strdupW
(
language
)))
...
...
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