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
58292e8a
Commit
58292e8a
authored
Jan 26, 2009
by
Alistair Leslie-Hughes
Committed by
Alexandre Julliard
Jan 27, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shdocvw: Add IServiceProvider support.
parent
e670b01f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
89 additions
and
1 deletion
+89
-1
shdocvw.h
dlls/shdocvw/shdocvw.h
+1
-0
webbrowser.c
dlls/shdocvw/tests/webbrowser.c
+12
-1
webbrowser.c
dlls/shdocvw/webbrowser.c
+76
-0
No files found.
dlls/shdocvw/shdocvw.h
View file @
58292e8a
...
...
@@ -119,6 +119,7 @@ struct WebBrowser {
const
IOleInPlaceActiveObjectVtbl
*
lpOleInPlaceActiveObjectVtbl
;
const
IOleCommandTargetVtbl
*
lpOleCommandTargetVtbl
;
const
IHlinkFrameVtbl
*
lpHlinkFrameVtbl
;
const
IServiceProviderVtbl
*
lpServiceProviderVtbl
;
LONG
ref
;
...
...
dlls/shdocvw/tests/webbrowser.c
View file @
58292e8a
...
...
@@ -1994,12 +1994,23 @@ static void test_IServiceProvider(IUnknown *unk)
{
IServiceProvider
*
servprov
=
(
void
*
)
0xdeadbeef
;
HRESULT
hres
;
IUnknown
*
ret
=
NULL
;
static
const
IID
IID_IBrowserService2
=
{
0x68BD21CC
,
0x438B
,
0x11d2
,{
0xA5
,
0x60
,
0x00
,
0xA0
,
0xC
,
0x2D
,
0xBF
,
0xE8
}};
hres
=
IUnknown_QueryInterface
(
unk
,
&
IID_IServiceProvider
,
(
void
**
)
&
servprov
);
todo_wine
ok
(
hres
==
S_OK
,
"QueryInterface returned %08x, expected S_OK
\n
"
,
hres
);
ok
(
hres
==
S_OK
,
"QueryInterface returned %08x, expected S_OK
\n
"
,
hres
);
if
(
FAILED
(
hres
))
return
;
hres
=
IServiceProvider_QueryService
(
servprov
,
&
SID_STopLevelBrowser
,
&
IID_IBrowserService2
,
(
LPVOID
*
)
&
ret
);
ok
(
hres
==
E_FAIL
,
"QueryService returned %08x, expected E_FAIL
\n
"
,
hres
);
ok
(
ret
==
NULL
,
"ret returned %p, expected NULL
\n
"
,
ret
);
if
(
hres
==
S_OK
)
{
IUnknown_Release
(
ret
);
}
IServiceProvider_Release
(
servprov
);
}
...
...
dlls/shdocvw/webbrowser.c
View file @
58292e8a
...
...
@@ -102,6 +102,9 @@ static HRESULT WINAPI WebBrowser_QueryInterface(IWebBrowser2 *iface, REFIID riid
}
else
if
(
IsEqualGUID
(
&
IID_IHlinkFrame
,
riid
))
{
TRACE
(
"(%p)->(IID_IHlinkFrame %p)
\n
"
,
This
,
ppv
);
*
ppv
=
HLINKFRAME
(
This
);
}
else
if
(
IsEqualGUID
(
&
IID_IServiceProvider
,
riid
))
{
*
ppv
=
SERVPROV
(
This
);
TRACE
(
"(%p)->(IID_IServiceProvider %p)
\n
"
,
This
,
ppv
);
}
else
if
(
IsEqualGUID
(
&
IID_IQuickActivate
,
riid
))
{
TRACE
(
"(%p)->(IID_IQuickActivate %p) returning NULL
\n
"
,
This
,
ppv
);
return
E_NOINTERFACE
;
...
...
@@ -1014,6 +1017,78 @@ static const IWebBrowser2Vtbl WebBrowser2Vtbl =
WebBrowser_put_Resizable
};
#define SERVPROV_THIS(iface) DEFINE_THIS(WebBrowser, OleObject, iface)
/*
* IServiceProvider interface.
*/
static
HRESULT
WINAPI
WebBrowser_IServiceProvider_QueryInterface
(
IServiceProvider
*
iface
,
REFIID
riid
,
LPVOID
*
ppv
)
{
WebBrowser
*
This
=
SERVPROV_THIS
(
iface
);
if
(
ppv
==
NULL
)
return
E_POINTER
;
*
ppv
=
NULL
;
if
(
IsEqualGUID
(
&
IID_IUnknown
,
riid
))
{
*
ppv
=
WEBBROWSER
(
This
);
TRACE
(
"(%p)->(IID_IUnknown %p)
\n
"
,
This
,
ppv
);
}
else
if
(
IsEqualGUID
(
&
IID_IServiceProvider
,
riid
))
{
*
ppv
=
WEBBROWSER
(
This
);
TRACE
(
"(%p)->(IID_IServiceProvider %p)
\n
"
,
This
,
ppv
);
}
if
(
*
ppv
)
{
IUnknown_AddRef
((
IUnknown
*
)
*
ppv
);
return
S_OK
;
}
FIXME
(
"(%p)->(%s %p) interface not supported
\n
"
,
This
,
debugstr_guid
(
riid
),
ppv
);
return
E_NOINTERFACE
;
}
static
ULONG
WINAPI
WebBrowser_IServiceProvider_AddRef
(
IServiceProvider
*
iface
)
{
WebBrowser
*
This
=
SERVPROV_THIS
(
iface
);
return
IWebBrowser_AddRef
(
WEBBROWSER
(
This
));
}
static
ULONG
WINAPI
WebBrowser_IServiceProvider_Release
(
IServiceProvider
*
iface
)
{
WebBrowser
*
This
=
SERVPROV_THIS
(
iface
);
return
IWebBrowser_Release
(
WEBBROWSER
(
This
));
}
static
HRESULT
STDMETHODCALLTYPE
WebBrowser_IServiceProvider_QueryService
(
IServiceProvider
*
iface
,
REFGUID
guidService
,
REFIID
riid
,
void
**
ppv
)
{
WebBrowser
*
This
=
SERVPROV_THIS
(
iface
);
static
const
IID
IID_IBrowserService2
=
{
0x68BD21CC
,
0x438B
,
0x11d2
,{
0xA5
,
0x60
,
0x00
,
0xA0
,
0xC
,
0x2D
,
0xBF
,
0xE8
}};
if
(
*
ppv
)
ppv
=
NULL
;
if
(
IsEqualGUID
(
&
IID_IBrowserService2
,
riid
))
{
TRACE
(
"(%p)->(IID_IBrowserService2 return E_FAIL)
\n
"
,
This
);
return
E_FAIL
;
}
FIXME
(
"(%p)->(%s, %s %p)
\n
"
,
This
,
debugstr_guid
(
guidService
),
debugstr_guid
(
riid
),
ppv
);
return
E_NOINTERFACE
;
}
#undef SERVPROV_THIS
static
const
IServiceProviderVtbl
ServiceProviderVtbl
=
{
WebBrowser_IServiceProvider_QueryInterface
,
WebBrowser_IServiceProvider_AddRef
,
WebBrowser_IServiceProvider_Release
,
WebBrowser_IServiceProvider_QueryService
};
static
HRESULT
WebBrowser_Create
(
INT
version
,
IUnknown
*
pOuter
,
REFIID
riid
,
void
**
ppv
)
{
WebBrowser
*
ret
;
...
...
@@ -1024,6 +1099,7 @@ static HRESULT WebBrowser_Create(INT version, IUnknown *pOuter, REFIID riid, voi
ret
=
heap_alloc
(
sizeof
(
WebBrowser
));
ret
->
lpWebBrowser2Vtbl
=
&
WebBrowser2Vtbl
;
ret
->
lpServiceProviderVtbl
=
&
ServiceProviderVtbl
;
ret
->
ref
=
0
;
ret
->
version
=
version
;
...
...
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