mshtml: COM cleanup for the IHlinkTarget iface.

This commit is contained in:
Michael Stefaniuc 2010-12-27 01:47:29 +01:00 committed by Alexandre Julliard
parent 6c7a78eca0
commit a8bb1ab85b
3 changed files with 15 additions and 13 deletions

View File

@ -36,43 +36,46 @@ WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
* IHlinkTarget implementation
*/
#define HLINKTRG_THIS(iface) DEFINE_THIS(HTMLDocument, HlinkTarget, iface)
static inline HTMLDocument *impl_from_IHlinkTarget(IHlinkTarget *iface)
{
return CONTAINING_RECORD(iface, HTMLDocument, IHlinkTarget_iface);
}
static HRESULT WINAPI HlinkTarget_QueryInterface(IHlinkTarget *iface, REFIID riid, void **ppv)
{
HTMLDocument *This = HLINKTRG_THIS(iface);
HTMLDocument *This = impl_from_IHlinkTarget(iface);
return htmldoc_query_interface(This, riid, ppv);
}
static ULONG WINAPI HlinkTarget_AddRef(IHlinkTarget *iface)
{
HTMLDocument *This = HLINKTRG_THIS(iface);
HTMLDocument *This = impl_from_IHlinkTarget(iface);
return htmldoc_addref(This);
}
static ULONG WINAPI HlinkTarget_Release(IHlinkTarget *iface)
{
HTMLDocument *This = HLINKTRG_THIS(iface);
HTMLDocument *This = impl_from_IHlinkTarget(iface);
return htmldoc_release(This);
}
static HRESULT WINAPI HlinkTarget_SetBrowseContext(IHlinkTarget *iface, IHlinkBrowseContext *pihlbc)
{
HTMLDocument *This = HLINKTRG_THIS(iface);
HTMLDocument *This = impl_from_IHlinkTarget(iface);
FIXME("(%p)->(%p)\n", This, pihlbc);
return E_NOTIMPL;
}
static HRESULT WINAPI HlinkTarget_GetBrowseContext(IHlinkTarget *iface, IHlinkBrowseContext **ppihlbc)
{
HTMLDocument *This = HLINKTRG_THIS(iface);
HTMLDocument *This = impl_from_IHlinkTarget(iface);
FIXME("(%p)->(%p)\n", This, ppihlbc);
return E_NOTIMPL;
}
static HRESULT WINAPI HlinkTarget_Navigate(IHlinkTarget *iface, DWORD grfHLNF, LPCWSTR pwzJumpLocation)
{
HTMLDocument *This = HLINKTRG_THIS(iface);
HTMLDocument *This = impl_from_IHlinkTarget(iface);
TRACE("(%p)->(%08x %s)\n", This, grfHLNF, debugstr_w(pwzJumpLocation));
@ -87,7 +90,7 @@ static HRESULT WINAPI HlinkTarget_Navigate(IHlinkTarget *iface, DWORD grfHLNF, L
static HRESULT WINAPI HlinkTarget_GetMoniker(IHlinkTarget *iface, LPCWSTR pwzLocation, DWORD dwAssign,
IMoniker **ppimkLocation)
{
HTMLDocument *This = HLINKTRG_THIS(iface);
HTMLDocument *This = impl_from_IHlinkTarget(iface);
FIXME("(%p)->(%s %08x %p)\n", This, debugstr_w(pwzLocation), dwAssign, ppimkLocation);
return E_NOTIMPL;
}
@ -95,7 +98,7 @@ static HRESULT WINAPI HlinkTarget_GetMoniker(IHlinkTarget *iface, LPCWSTR pwzLoc
static HRESULT WINAPI HlinkTarget_GetFriendlyName(IHlinkTarget *iface, LPCWSTR pwzLocation,
LPWSTR *ppwzFriendlyName)
{
HTMLDocument *This = HLINKTRG_THIS(iface);
HTMLDocument *This = impl_from_IHlinkTarget(iface);
FIXME("(%p)->(%s %p)\n", This, debugstr_w(pwzLocation), ppwzFriendlyName);
return E_NOTIMPL;
}
@ -113,5 +116,5 @@ static const IHlinkTargetVtbl HlinkTargetVtbl = {
void HTMLDocument_Hlink_Init(HTMLDocument *This)
{
This->lpHlinkTargetVtbl = &HlinkTargetVtbl;
This->IHlinkTarget_iface.lpVtbl = &HlinkTargetVtbl;
}

View File

@ -1782,7 +1782,7 @@ static BOOL htmldoc_qi(HTMLDocument *This, REFIID riid, void **ppv)
*ppv = &This->IOleControl_iface;
}else if(IsEqualGUID(&IID_IHlinkTarget, riid)) {
TRACE("(%p)->(IID_IHlinkTarget, %p)\n", This, ppv);
*ppv = HLNKTARGET(This);
*ppv = &This->IHlinkTarget_iface;
}else if(IsEqualGUID(&IID_IConnectionPointContainer, riid)) {
TRACE("(%p)->(IID_IConnectionPointContainer %p)\n", This, ppv);
*ppv = CONPTCONT(&This->cp_container);

View File

@ -360,7 +360,7 @@ struct HTMLDocument {
IServiceProvider IServiceProvider_iface;
IOleCommandTarget IOleCommandTarget_iface;
IOleControl IOleControl_iface;
const IHlinkTargetVtbl *lpHlinkTargetVtbl;
IHlinkTarget IHlinkTarget_iface;
IPersistStreamInit IPersistStreamInit_iface;
const IDispatchExVtbl *lpIDispatchExVtbl;
const ISupportErrorInfoVtbl *lpSupportErrorInfoVtbl;
@ -625,7 +625,6 @@ struct HTMLDocumentNode {
#define HTMLWINDOW2(x) ((IHTMLWindow2*) &(x)->lpHTMLWindow2Vtbl)
#define HTMLWINDOW3(x) ((IHTMLWindow3*) &(x)->lpHTMLWindow3Vtbl)
#define HTMLWINDOW4(x) ((IHTMLWindow4*) &(x)->lpHTMLWindow4Vtbl)
#define HLNKTARGET(x) ((IHlinkTarget*) &(x)->lpHlinkTargetVtbl)
#define CONPTCONT(x) ((IConnectionPointContainer*) &(x)->lpConnectionPointContainerVtbl)
#define CUSTOMDOC(x) ((ICustomDoc*) &(x)->lpCustomDocVtbl)
#define OBJSITE(x) ((IObjectWithSite*) &(x)->lpObjectWithSiteVtbl)