Commit ca2e0c5e authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

mshtml: Use IUnknownVtbl in wrapper_vtbl.

parent 80a222a8
......@@ -215,10 +215,15 @@ DEFINE_WRAPPER_FUNC(98, 392, 784)
DEFINE_WRAPPER_FUNC(99, 396, 792)
/* The size was found by testing when calls start crashing. It looks like MS wraps up to 100 functions. */
static const void *wrapper_vtbl[] = {
static const struct {
IUnknownVtbl unk_vtbl;
const void *wrappers[97];
} wrapper_vtbl = {
{
wrapper_QueryInterface,
wrapper_AddRef,
wrapper_Release,
wrapper_Release
}, {
wrapper_func_3,
wrapper_func_4,
wrapper_func_5,
......@@ -316,6 +321,7 @@ static const void *wrapper_vtbl[] = {
wrapper_func_97,
wrapper_func_98,
wrapper_func_99
}
};
HRESULT wrap_iface(IUnknown *iface, IUnknown *ref_unk, IUnknown **ret)
......@@ -326,7 +332,7 @@ HRESULT wrap_iface(IUnknown *iface, IUnknown *ref_unk, IUnknown **ret)
if(!wrapper)
return E_OUTOFMEMORY;
wrapper->IUnknown_iface.lpVtbl = (const IUnknownVtbl*)wrapper_vtbl;
wrapper->IUnknown_iface.lpVtbl = &wrapper_vtbl.unk_vtbl;
wrapper->ref = 1;
IUnknown_AddRef(iface);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment