diff --git a/dlls/mshtml/htmldoc.c b/dlls/mshtml/htmldoc.c
index 90cafd7272d..486eefad654 100644
--- a/dlls/mshtml/htmldoc.c
+++ b/dlls/mshtml/htmldoc.c
@@ -1740,7 +1740,7 @@ static BOOL htmldoc_qi(HTMLDocument *This, REFIID riid, void **ppv)
*ppv = &This->IPersistFile_iface;
}else if(IsEqualGUID(&IID_IMonikerProp, riid)) {
TRACE("(%p)->(IID_IMonikerProp, %p)\n", This, ppv);
- *ppv = MONPROP(This);
+ *ppv = &This->IMonikerProp_iface;
}else if(IsEqualGUID(&IID_IOleObject, riid)) {
TRACE("(%p)->(IID_IOleObject, %p)\n", This, ppv);
*ppv = OLEOBJ(This);
diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h
index 9059dedf4aa..62a2adff83c 100644
--- a/dlls/mshtml/mshtml_private.h
+++ b/dlls/mshtml/mshtml_private.h
@@ -350,7 +350,7 @@ struct HTMLDocument {
IPersistMoniker IPersistMoniker_iface;
IPersistFile IPersistFile_iface;
IPersistHistory IPersistHistory_iface;
- const IMonikerPropVtbl *lpMonikerPropVtbl;
+ IMonikerProp IMonikerProp_iface;
const IOleObjectVtbl *lpOleObjectVtbl;
const IOleDocumentVtbl *lpOleDocumentVtbl;
const IOleDocumentViewVtbl *lpOleDocumentViewVtbl;
@@ -626,7 +626,6 @@ struct HTMLDocumentNode {
#define HTMLWINDOW3(x) ((IHTMLWindow3*) &(x)->lpHTMLWindow3Vtbl)
#define HTMLWINDOW4(x) ((IHTMLWindow4*) &(x)->lpHTMLWindow4Vtbl)
-#define MONPROP(x) ((IMonikerProp*) &(x)->lpMonikerPropVtbl)
#define OLEOBJ(x) ((IOleObject*) &(x)->lpOleObjectVtbl)
#define OLEDOC(x) ((IOleDocument*) &(x)->lpOleDocumentVtbl)
#define DOCVIEW(x) ((IOleDocumentView*) &(x)->lpOleDocumentViewVtbl)
diff --git a/dlls/mshtml/persist.c b/dlls/mshtml/persist.c
index 46d00a3a449..24d3c21f6a5 100644
--- a/dlls/mshtml/persist.c
+++ b/dlls/mshtml/persist.c
@@ -466,29 +466,32 @@ static const IPersistMonikerVtbl PersistMonikerVtbl = {
* IMonikerProp implementation
*/
-#define MONPROP_THIS(iface) DEFINE_THIS(HTMLDocument, MonikerProp, iface)
+static inline HTMLDocument *impl_from_IMonikerProp(IMonikerProp *iface)
+{
+ return CONTAINING_RECORD(iface, HTMLDocument, IMonikerProp_iface);
+}
static HRESULT WINAPI MonikerProp_QueryInterface(IMonikerProp *iface, REFIID riid, void **ppv)
{
- HTMLDocument *This = MONPROP_THIS(iface);
+ HTMLDocument *This = impl_from_IMonikerProp(iface);
return htmldoc_query_interface(This, riid, ppv);
}
static ULONG WINAPI MonikerProp_AddRef(IMonikerProp *iface)
{
- HTMLDocument *This = MONPROP_THIS(iface);
+ HTMLDocument *This = impl_from_IMonikerProp(iface);
return htmldoc_addref(This);
}
static ULONG WINAPI MonikerProp_Release(IMonikerProp *iface)
{
- HTMLDocument *This = MONPROP_THIS(iface);
+ HTMLDocument *This = impl_from_IMonikerProp(iface);
return htmldoc_release(This);
}
static HRESULT WINAPI MonikerProp_PutProperty(IMonikerProp *iface, MONIKERPROPERTY mkp, LPCWSTR val)
{
- HTMLDocument *This = MONPROP_THIS(iface);
+ HTMLDocument *This = impl_from_IMonikerProp(iface);
TRACE("(%p)->(%d %s)\n", This, mkp, debugstr_w(val));
@@ -835,7 +838,7 @@ void HTMLDocument_Persist_Init(HTMLDocument *This)
{
This->IPersistMoniker_iface.lpVtbl = &PersistMonikerVtbl;
This->IPersistFile_iface.lpVtbl = &PersistFileVtbl;
- This->lpMonikerPropVtbl = &MonikerPropVtbl;
+ This->IMonikerProp_iface.lpVtbl = &MonikerPropVtbl;
This->IPersistStreamInit_iface.lpVtbl = &PersistStreamInitVtbl;
This->IPersistHistory_iface.lpVtbl = &PersistHistoryVtbl;
}