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
06aa58f4
Commit
06aa58f4
authored
Dec 06, 2010
by
Jacek Caban
Committed by
Alexandre Julliard
Dec 06, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Added PluginHost's IDispatch stub implementation.
parent
ec29487f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
106 additions
and
0 deletions
+106
-0
pluginhost.c
dlls/mshtml/pluginhost.c
+68
-0
pluginhost.h
dlls/mshtml/pluginhost.h
+1
-0
activex.c
dlls/mshtml/tests/activex.c
+37
-0
No files found.
dlls/mshtml/pluginhost.c
View file @
06aa58f4
...
...
@@ -111,6 +111,9 @@ static HRESULT WINAPI PHClientSite_QueryInterface(IOleClientSite *iface, REFIID
}
else
if
(
IsEqualGUID
(
&
IID_IPropertyNotifySink
,
riid
))
{
TRACE
(
"(%p)->(IID_IPropertyNotifySink %p)
\n
"
,
This
,
ppv
);
*
ppv
=
&
This
->
IPropertyNotifySink_iface
;
}
else
if
(
IsEqualGUID
(
&
IID_IDispatch
,
riid
))
{
TRACE
(
"(%p)->(IID_IDispatch %p)
\n
"
,
This
,
ppv
);
*
ppv
=
&
This
->
IDispatch_iface
;
}
else
{
WARN
(
"Unsupported interface %s
\n
"
,
debugstr_guid
(
riid
));
*
ppv
=
NULL
;
...
...
@@ -318,6 +321,70 @@ static const IPropertyNotifySinkVtbl PropertyNotifySinkVtbl = {
PHPropertyNotifySink_OnRequestEdit
};
static
inline
PluginHost
*
impl_from_IDispatch
(
IDispatch
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
PluginHost
,
IDispatch_iface
);
}
static
HRESULT
WINAPI
PHDispatch_QueryInterface
(
IDispatch
*
iface
,
REFIID
riid
,
void
**
ppv
)
{
PluginHost
*
This
=
impl_from_IDispatch
(
iface
);
return
IOleClientSite_QueryInterface
(
&
This
->
IOleClientSite_iface
,
riid
,
ppv
);
}
static
ULONG
WINAPI
PHDispatch_AddRef
(
IDispatch
*
iface
)
{
PluginHost
*
This
=
impl_from_IDispatch
(
iface
);
return
IOleClientSite_AddRef
(
&
This
->
IOleClientSite_iface
);
}
static
ULONG
WINAPI
PHDispatch_Release
(
IDispatch
*
iface
)
{
PluginHost
*
This
=
impl_from_IDispatch
(
iface
);
return
IOleClientSite_Release
(
&
This
->
IOleClientSite_iface
);
}
static
HRESULT
WINAPI
PHDispatch_GetTypeInfoCount
(
IDispatch
*
iface
,
UINT
*
pctinfo
)
{
PluginHost
*
This
=
impl_from_IDispatch
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
pctinfo
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
PHDispatch_GetTypeInfo
(
IDispatch
*
iface
,
UINT
iTInfo
,
LCID
lcid
,
ITypeInfo
**
ppTInfo
)
{
PluginHost
*
This
=
impl_from_IDispatch
(
iface
);
FIXME
(
"(%p)->(%d %d %p)
\n
"
,
This
,
iTInfo
,
lcid
,
ppTInfo
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
PHDispatch_GetIDsOfNames
(
IDispatch
*
iface
,
REFIID
riid
,
LPOLESTR
*
rgszNames
,
UINT
cNames
,
LCID
lcid
,
DISPID
*
rgDispId
)
{
PluginHost
*
This
=
impl_from_IDispatch
(
iface
);
FIXME
(
"(%p)->(%s %p %d %d %p)
\n
"
,
This
,
debugstr_guid
(
riid
),
rgszNames
,
cNames
,
lcid
,
rgDispId
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
PHDispatch_Invoke
(
IDispatch
*
iface
,
DISPID
dispid
,
REFIID
riid
,
LCID
lcid
,
WORD
wFlags
,
DISPPARAMS
*
pDispParams
,
VARIANT
*
pVarResult
,
EXCEPINFO
*
pExcepInfo
,
UINT
*
puArgErr
)
{
PluginHost
*
This
=
impl_from_IDispatch
(
iface
);
FIXME
(
"(%p)->(%d %x %p %p)
\n
"
,
This
,
dispid
,
wFlags
,
pDispParams
,
pVarResult
);
return
E_NOTIMPL
;
}
static
const
IDispatchVtbl
DispatchVtbl
=
{
PHDispatch_QueryInterface
,
PHDispatch_AddRef
,
PHDispatch_Release
,
PHDispatch_GetTypeInfoCount
,
PHDispatch_GetTypeInfo
,
PHDispatch_GetIDsOfNames
,
PHDispatch_Invoke
};
HRESULT
create_plugin_host
(
IUnknown
*
unk
,
PluginHost
**
ret
)
{
PluginHost
*
host
;
...
...
@@ -329,6 +396,7 @@ HRESULT create_plugin_host(IUnknown *unk, PluginHost **ret)
host
->
IOleClientSite_iface
.
lpVtbl
=
&
OleClientSiteVtbl
;
host
->
IAdviseSinkEx_iface
.
lpVtbl
=
&
AdviseSinkExVtbl
;
host
->
IPropertyNotifySink_iface
.
lpVtbl
=
&
PropertyNotifySinkVtbl
;
host
->
IDispatch_iface
.
lpVtbl
=
&
DispatchVtbl
;
host
->
ref
=
1
;
...
...
dlls/mshtml/pluginhost.h
View file @
06aa58f4
...
...
@@ -22,6 +22,7 @@ typedef struct {
IOleClientSite
IOleClientSite_iface
;
IAdviseSinkEx
IAdviseSinkEx_iface
;
IPropertyNotifySink
IPropertyNotifySink_iface
;
IDispatch
IDispatch_iface
;
LONG
ref
;
...
...
dlls/mshtml/tests/activex.c
View file @
06aa58f4
...
...
@@ -87,6 +87,27 @@ static const char object_ax_str[] =
"</object>"
"</body></html>"
;
static
const
REFIID
pluginhost_iids
[]
=
{
&
IID_IOleClientSite
,
&
IID_IAdviseSink
,
&
IID_IAdviseSinkEx
,
&
IID_IPropertyNotifySink
,
&
IID_IDispatch
,
NULL
};
static
const
char
*
dbgstr_guid
(
REFIID
riid
)
{
static
char
buf
[
50
];
sprintf
(
buf
,
"{%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}"
,
riid
->
Data1
,
riid
->
Data2
,
riid
->
Data3
,
riid
->
Data4
[
0
],
riid
->
Data4
[
1
],
riid
->
Data4
[
2
],
riid
->
Data4
[
3
],
riid
->
Data4
[
4
],
riid
->
Data4
[
5
],
riid
->
Data4
[
6
],
riid
->
Data4
[
7
]);
return
buf
;
}
static
BOOL
iface_cmp
(
IUnknown
*
iface1
,
IUnknown
*
iface2
)
{
IUnknown
*
unk1
,
*
unk2
;
...
...
@@ -102,6 +123,21 @@ static BOOL iface_cmp(IUnknown *iface1, IUnknown *iface2)
return
unk1
==
unk2
;
}
#define test_ifaces(i,ids) _test_ifaces(__LINE__,i,ids)
static
void
_test_ifaces
(
unsigned
line
,
IUnknown
*
iface
,
REFIID
*
iids
)
{
const
IID
*
const
*
piid
;
IUnknown
*
unk
;
HRESULT
hres
;
for
(
piid
=
iids
;
*
piid
;
piid
++
)
{
hres
=
IDispatch_QueryInterface
(
iface
,
*
piid
,
(
void
**
)
&
unk
);
ok_
(
__FILE__
,
line
)
(
hres
==
S_OK
,
"Could not get %s interface: %08x
\n
"
,
dbgstr_guid
(
*
piid
),
hres
);
if
(
SUCCEEDED
(
hres
))
IUnknown_Release
(
unk
);
}
}
static
HRESULT
ax_qi
(
REFIID
,
void
**
);
static
HRESULT
WINAPI
OleControl_QueryInterface
(
IOleControl
*
iface
,
REFIID
riid
,
void
**
ppv
)
...
...
@@ -210,6 +246,7 @@ static HRESULT WINAPI QuickActivate_QuickActivate(IQuickActivate *iface, QACONTA
"container->pClientSite != container->pAdviseSink
\n
"
);
ok
(
iface_cmp
((
IUnknown
*
)
container
->
pClientSite
,
(
IUnknown
*
)
container
->
pPropertyNotifySink
),
"container->pClientSite != container->pPropertyNotifySink
\n
"
);
test_ifaces
((
IUnknown
*
)
container
->
pClientSite
,
pluginhost_iids
);
return
S_OK
;
}
...
...
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