mshtml: COM cleanup for the IHTMLLocation iface.
This commit is contained in:
parent
f2c4a12261
commit
ed9c65b1ba
|
@ -64,20 +64,23 @@ static HRESULT get_url_components(HTMLLocation *This, URL_COMPONENTSW *url)
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
#define HTMLLOCATION_THIS(iface) DEFINE_THIS(HTMLLocation, HTMLLocation, iface)
|
static inline HTMLLocation *impl_from_IHTMLLocation(IHTMLLocation *iface)
|
||||||
|
{
|
||||||
|
return CONTAINING_RECORD(iface, HTMLLocation, IHTMLLocation_iface);
|
||||||
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI HTMLLocation_QueryInterface(IHTMLLocation *iface, REFIID riid, void **ppv)
|
static HRESULT WINAPI HTMLLocation_QueryInterface(IHTMLLocation *iface, REFIID riid, void **ppv)
|
||||||
{
|
{
|
||||||
HTMLLocation *This = HTMLLOCATION_THIS(iface);
|
HTMLLocation *This = impl_from_IHTMLLocation(iface);
|
||||||
|
|
||||||
*ppv = NULL;
|
*ppv = NULL;
|
||||||
|
|
||||||
if(IsEqualGUID(&IID_IUnknown, riid)) {
|
if(IsEqualGUID(&IID_IUnknown, riid)) {
|
||||||
TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv);
|
TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv);
|
||||||
*ppv = HTMLLOCATION(This);
|
*ppv = &This->IHTMLLocation_iface;
|
||||||
}else if(IsEqualGUID(&IID_IHTMLLocation, riid)) {
|
}else if(IsEqualGUID(&IID_IHTMLLocation, riid)) {
|
||||||
TRACE("(%p)->(IID_IHTMLLocation %p)\n", This, ppv);
|
TRACE("(%p)->(IID_IHTMLLocation %p)\n", This, ppv);
|
||||||
*ppv = HTMLLOCATION(This);
|
*ppv = &This->IHTMLLocation_iface;
|
||||||
}else if(dispex_query_interface(&This->dispex, riid, ppv)) {
|
}else if(dispex_query_interface(&This->dispex, riid, ppv)) {
|
||||||
return *ppv ? S_OK : E_NOINTERFACE;
|
return *ppv ? S_OK : E_NOINTERFACE;
|
||||||
}
|
}
|
||||||
|
@ -93,7 +96,7 @@ static HRESULT WINAPI HTMLLocation_QueryInterface(IHTMLLocation *iface, REFIID r
|
||||||
|
|
||||||
static ULONG WINAPI HTMLLocation_AddRef(IHTMLLocation *iface)
|
static ULONG WINAPI HTMLLocation_AddRef(IHTMLLocation *iface)
|
||||||
{
|
{
|
||||||
HTMLLocation *This = HTMLLOCATION_THIS(iface);
|
HTMLLocation *This = impl_from_IHTMLLocation(iface);
|
||||||
LONG ref = InterlockedIncrement(&This->ref);
|
LONG ref = InterlockedIncrement(&This->ref);
|
||||||
|
|
||||||
TRACE("(%p) ref=%d\n", This, ref);
|
TRACE("(%p) ref=%d\n", This, ref);
|
||||||
|
@ -103,7 +106,7 @@ static ULONG WINAPI HTMLLocation_AddRef(IHTMLLocation *iface)
|
||||||
|
|
||||||
static ULONG WINAPI HTMLLocation_Release(IHTMLLocation *iface)
|
static ULONG WINAPI HTMLLocation_Release(IHTMLLocation *iface)
|
||||||
{
|
{
|
||||||
HTMLLocation *This = HTMLLOCATION_THIS(iface);
|
HTMLLocation *This = impl_from_IHTMLLocation(iface);
|
||||||
LONG ref = InterlockedDecrement(&This->ref);
|
LONG ref = InterlockedDecrement(&This->ref);
|
||||||
|
|
||||||
TRACE("(%p) ref=%d\n", This, ref);
|
TRACE("(%p) ref=%d\n", This, ref);
|
||||||
|
@ -120,14 +123,14 @@ static ULONG WINAPI HTMLLocation_Release(IHTMLLocation *iface)
|
||||||
|
|
||||||
static HRESULT WINAPI HTMLLocation_GetTypeInfoCount(IHTMLLocation *iface, UINT *pctinfo)
|
static HRESULT WINAPI HTMLLocation_GetTypeInfoCount(IHTMLLocation *iface, UINT *pctinfo)
|
||||||
{
|
{
|
||||||
HTMLLocation *This = HTMLLOCATION_THIS(iface);
|
HTMLLocation *This = impl_from_IHTMLLocation(iface);
|
||||||
return IDispatchEx_GetTypeInfoCount(&This->dispex.IDispatchEx_iface, pctinfo);
|
return IDispatchEx_GetTypeInfoCount(&This->dispex.IDispatchEx_iface, pctinfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI HTMLLocation_GetTypeInfo(IHTMLLocation *iface, UINT iTInfo,
|
static HRESULT WINAPI HTMLLocation_GetTypeInfo(IHTMLLocation *iface, UINT iTInfo,
|
||||||
LCID lcid, ITypeInfo **ppTInfo)
|
LCID lcid, ITypeInfo **ppTInfo)
|
||||||
{
|
{
|
||||||
HTMLLocation *This = HTMLLOCATION_THIS(iface);
|
HTMLLocation *This = impl_from_IHTMLLocation(iface);
|
||||||
return IDispatchEx_GetTypeInfo(&This->dispex.IDispatchEx_iface, iTInfo, lcid, ppTInfo);
|
return IDispatchEx_GetTypeInfo(&This->dispex.IDispatchEx_iface, iTInfo, lcid, ppTInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -135,7 +138,7 @@ static HRESULT WINAPI HTMLLocation_GetIDsOfNames(IHTMLLocation *iface, REFIID ri
|
||||||
LPOLESTR *rgszNames, UINT cNames,
|
LPOLESTR *rgszNames, UINT cNames,
|
||||||
LCID lcid, DISPID *rgDispId)
|
LCID lcid, DISPID *rgDispId)
|
||||||
{
|
{
|
||||||
HTMLLocation *This = HTMLLOCATION_THIS(iface);
|
HTMLLocation *This = impl_from_IHTMLLocation(iface);
|
||||||
return IDispatchEx_GetIDsOfNames(&This->dispex.IDispatchEx_iface, riid, rgszNames, cNames,
|
return IDispatchEx_GetIDsOfNames(&This->dispex.IDispatchEx_iface, riid, rgszNames, cNames,
|
||||||
lcid, rgDispId);
|
lcid, rgDispId);
|
||||||
}
|
}
|
||||||
|
@ -144,14 +147,14 @@ static HRESULT WINAPI HTMLLocation_Invoke(IHTMLLocation *iface, DISPID dispIdMem
|
||||||
REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
|
REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
|
||||||
VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
|
VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
|
||||||
{
|
{
|
||||||
HTMLLocation *This = HTMLLOCATION_THIS(iface);
|
HTMLLocation *This = impl_from_IHTMLLocation(iface);
|
||||||
return IDispatchEx_Invoke(&This->dispex.IDispatchEx_iface, dispIdMember, riid, lcid,
|
return IDispatchEx_Invoke(&This->dispex.IDispatchEx_iface, dispIdMember, riid, lcid,
|
||||||
wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
|
wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI HTMLLocation_put_href(IHTMLLocation *iface, BSTR v)
|
static HRESULT WINAPI HTMLLocation_put_href(IHTMLLocation *iface, BSTR v)
|
||||||
{
|
{
|
||||||
HTMLLocation *This = HTMLLOCATION_THIS(iface);
|
HTMLLocation *This = impl_from_IHTMLLocation(iface);
|
||||||
|
|
||||||
TRACE("(%p)->(%s)\n", This, debugstr_w(v));
|
TRACE("(%p)->(%s)\n", This, debugstr_w(v));
|
||||||
|
|
||||||
|
@ -165,7 +168,7 @@ static HRESULT WINAPI HTMLLocation_put_href(IHTMLLocation *iface, BSTR v)
|
||||||
|
|
||||||
static HRESULT WINAPI HTMLLocation_get_href(IHTMLLocation *iface, BSTR *p)
|
static HRESULT WINAPI HTMLLocation_get_href(IHTMLLocation *iface, BSTR *p)
|
||||||
{
|
{
|
||||||
HTMLLocation *This = HTMLLOCATION_THIS(iface);
|
HTMLLocation *This = impl_from_IHTMLLocation(iface);
|
||||||
URL_COMPONENTSW url = {sizeof(URL_COMPONENTSW)};
|
URL_COMPONENTSW url = {sizeof(URL_COMPONENTSW)};
|
||||||
WCHAR *buf = NULL, *url_path = NULL;
|
WCHAR *buf = NULL, *url_path = NULL;
|
||||||
HRESULT hres, ret;
|
HRESULT hres, ret;
|
||||||
|
@ -265,14 +268,14 @@ cleanup:
|
||||||
|
|
||||||
static HRESULT WINAPI HTMLLocation_put_protocol(IHTMLLocation *iface, BSTR v)
|
static HRESULT WINAPI HTMLLocation_put_protocol(IHTMLLocation *iface, BSTR v)
|
||||||
{
|
{
|
||||||
HTMLLocation *This = HTMLLOCATION_THIS(iface);
|
HTMLLocation *This = impl_from_IHTMLLocation(iface);
|
||||||
FIXME("(%p)->(%s)\n", This, debugstr_w(v));
|
FIXME("(%p)->(%s)\n", This, debugstr_w(v));
|
||||||
return E_NOTIMPL;
|
return E_NOTIMPL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI HTMLLocation_get_protocol(IHTMLLocation *iface, BSTR *p)
|
static HRESULT WINAPI HTMLLocation_get_protocol(IHTMLLocation *iface, BSTR *p)
|
||||||
{
|
{
|
||||||
HTMLLocation *This = HTMLLOCATION_THIS(iface);
|
HTMLLocation *This = impl_from_IHTMLLocation(iface);
|
||||||
URL_COMPONENTSW url = {sizeof(URL_COMPONENTSW)};
|
URL_COMPONENTSW url = {sizeof(URL_COMPONENTSW)};
|
||||||
HRESULT hres;
|
HRESULT hres;
|
||||||
|
|
||||||
|
@ -302,14 +305,14 @@ static HRESULT WINAPI HTMLLocation_get_protocol(IHTMLLocation *iface, BSTR *p)
|
||||||
|
|
||||||
static HRESULT WINAPI HTMLLocation_put_host(IHTMLLocation *iface, BSTR v)
|
static HRESULT WINAPI HTMLLocation_put_host(IHTMLLocation *iface, BSTR v)
|
||||||
{
|
{
|
||||||
HTMLLocation *This = HTMLLOCATION_THIS(iface);
|
HTMLLocation *This = impl_from_IHTMLLocation(iface);
|
||||||
FIXME("(%p)->(%s)\n", This, debugstr_w(v));
|
FIXME("(%p)->(%s)\n", This, debugstr_w(v));
|
||||||
return E_NOTIMPL;
|
return E_NOTIMPL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI HTMLLocation_get_host(IHTMLLocation *iface, BSTR *p)
|
static HRESULT WINAPI HTMLLocation_get_host(IHTMLLocation *iface, BSTR *p)
|
||||||
{
|
{
|
||||||
HTMLLocation *This = HTMLLOCATION_THIS(iface);
|
HTMLLocation *This = impl_from_IHTMLLocation(iface);
|
||||||
URL_COMPONENTSW url = {sizeof(URL_COMPONENTSW)};
|
URL_COMPONENTSW url = {sizeof(URL_COMPONENTSW)};
|
||||||
HRESULT hres;
|
HRESULT hres;
|
||||||
|
|
||||||
|
@ -348,14 +351,14 @@ static HRESULT WINAPI HTMLLocation_get_host(IHTMLLocation *iface, BSTR *p)
|
||||||
|
|
||||||
static HRESULT WINAPI HTMLLocation_put_hostname(IHTMLLocation *iface, BSTR v)
|
static HRESULT WINAPI HTMLLocation_put_hostname(IHTMLLocation *iface, BSTR v)
|
||||||
{
|
{
|
||||||
HTMLLocation *This = HTMLLOCATION_THIS(iface);
|
HTMLLocation *This = impl_from_IHTMLLocation(iface);
|
||||||
FIXME("(%p)->(%s)\n", This, debugstr_w(v));
|
FIXME("(%p)->(%s)\n", This, debugstr_w(v));
|
||||||
return E_NOTIMPL;
|
return E_NOTIMPL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI HTMLLocation_get_hostname(IHTMLLocation *iface, BSTR *p)
|
static HRESULT WINAPI HTMLLocation_get_hostname(IHTMLLocation *iface, BSTR *p)
|
||||||
{
|
{
|
||||||
HTMLLocation *This = HTMLLOCATION_THIS(iface);
|
HTMLLocation *This = impl_from_IHTMLLocation(iface);
|
||||||
URL_COMPONENTSW url = {sizeof(URL_COMPONENTSW)};
|
URL_COMPONENTSW url = {sizeof(URL_COMPONENTSW)};
|
||||||
HRESULT hres;
|
HRESULT hres;
|
||||||
|
|
||||||
|
@ -382,14 +385,14 @@ static HRESULT WINAPI HTMLLocation_get_hostname(IHTMLLocation *iface, BSTR *p)
|
||||||
|
|
||||||
static HRESULT WINAPI HTMLLocation_put_port(IHTMLLocation *iface, BSTR v)
|
static HRESULT WINAPI HTMLLocation_put_port(IHTMLLocation *iface, BSTR v)
|
||||||
{
|
{
|
||||||
HTMLLocation *This = HTMLLOCATION_THIS(iface);
|
HTMLLocation *This = impl_from_IHTMLLocation(iface);
|
||||||
FIXME("(%p)->(%s)\n", This, debugstr_w(v));
|
FIXME("(%p)->(%s)\n", This, debugstr_w(v));
|
||||||
return E_NOTIMPL;
|
return E_NOTIMPL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI HTMLLocation_get_port(IHTMLLocation *iface, BSTR *p)
|
static HRESULT WINAPI HTMLLocation_get_port(IHTMLLocation *iface, BSTR *p)
|
||||||
{
|
{
|
||||||
HTMLLocation *This = HTMLLOCATION_THIS(iface);
|
HTMLLocation *This = impl_from_IHTMLLocation(iface);
|
||||||
URL_COMPONENTSW url = {sizeof(URL_COMPONENTSW)};
|
URL_COMPONENTSW url = {sizeof(URL_COMPONENTSW)};
|
||||||
HRESULT hres;
|
HRESULT hres;
|
||||||
|
|
||||||
|
@ -419,14 +422,14 @@ static HRESULT WINAPI HTMLLocation_get_port(IHTMLLocation *iface, BSTR *p)
|
||||||
|
|
||||||
static HRESULT WINAPI HTMLLocation_put_pathname(IHTMLLocation *iface, BSTR v)
|
static HRESULT WINAPI HTMLLocation_put_pathname(IHTMLLocation *iface, BSTR v)
|
||||||
{
|
{
|
||||||
HTMLLocation *This = HTMLLOCATION_THIS(iface);
|
HTMLLocation *This = impl_from_IHTMLLocation(iface);
|
||||||
FIXME("(%p)->(%s)\n", This, debugstr_w(v));
|
FIXME("(%p)->(%s)\n", This, debugstr_w(v));
|
||||||
return E_NOTIMPL;
|
return E_NOTIMPL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI HTMLLocation_get_pathname(IHTMLLocation *iface, BSTR *p)
|
static HRESULT WINAPI HTMLLocation_get_pathname(IHTMLLocation *iface, BSTR *p)
|
||||||
{
|
{
|
||||||
HTMLLocation *This = HTMLLOCATION_THIS(iface);
|
HTMLLocation *This = impl_from_IHTMLLocation(iface);
|
||||||
URL_COMPONENTSW url = {sizeof(URL_COMPONENTSW)};
|
URL_COMPONENTSW url = {sizeof(URL_COMPONENTSW)};
|
||||||
HRESULT hres;
|
HRESULT hres;
|
||||||
|
|
||||||
|
@ -453,14 +456,14 @@ static HRESULT WINAPI HTMLLocation_get_pathname(IHTMLLocation *iface, BSTR *p)
|
||||||
|
|
||||||
static HRESULT WINAPI HTMLLocation_put_search(IHTMLLocation *iface, BSTR v)
|
static HRESULT WINAPI HTMLLocation_put_search(IHTMLLocation *iface, BSTR v)
|
||||||
{
|
{
|
||||||
HTMLLocation *This = HTMLLOCATION_THIS(iface);
|
HTMLLocation *This = impl_from_IHTMLLocation(iface);
|
||||||
FIXME("(%p)->(%s)\n", This, debugstr_w(v));
|
FIXME("(%p)->(%s)\n", This, debugstr_w(v));
|
||||||
return E_NOTIMPL;
|
return E_NOTIMPL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI HTMLLocation_get_search(IHTMLLocation *iface, BSTR *p)
|
static HRESULT WINAPI HTMLLocation_get_search(IHTMLLocation *iface, BSTR *p)
|
||||||
{
|
{
|
||||||
HTMLLocation *This = HTMLLOCATION_THIS(iface);
|
HTMLLocation *This = impl_from_IHTMLLocation(iface);
|
||||||
URL_COMPONENTSW url = {sizeof(URL_COMPONENTSW)};
|
URL_COMPONENTSW url = {sizeof(URL_COMPONENTSW)};
|
||||||
HRESULT hres;
|
HRESULT hres;
|
||||||
const WCHAR hash[] = {'#',0};
|
const WCHAR hash[] = {'#',0};
|
||||||
|
@ -491,14 +494,14 @@ static HRESULT WINAPI HTMLLocation_get_search(IHTMLLocation *iface, BSTR *p)
|
||||||
|
|
||||||
static HRESULT WINAPI HTMLLocation_put_hash(IHTMLLocation *iface, BSTR v)
|
static HRESULT WINAPI HTMLLocation_put_hash(IHTMLLocation *iface, BSTR v)
|
||||||
{
|
{
|
||||||
HTMLLocation *This = HTMLLOCATION_THIS(iface);
|
HTMLLocation *This = impl_from_IHTMLLocation(iface);
|
||||||
FIXME("(%p)->(%s)\n", This, debugstr_w(v));
|
FIXME("(%p)->(%s)\n", This, debugstr_w(v));
|
||||||
return E_NOTIMPL;
|
return E_NOTIMPL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI HTMLLocation_get_hash(IHTMLLocation *iface, BSTR *p)
|
static HRESULT WINAPI HTMLLocation_get_hash(IHTMLLocation *iface, BSTR *p)
|
||||||
{
|
{
|
||||||
HTMLLocation *This = HTMLLOCATION_THIS(iface);
|
HTMLLocation *This = impl_from_IHTMLLocation(iface);
|
||||||
URL_COMPONENTSW url = {sizeof(URL_COMPONENTSW)};
|
URL_COMPONENTSW url = {sizeof(URL_COMPONENTSW)};
|
||||||
const WCHAR hash[] = {'#',0};
|
const WCHAR hash[] = {'#',0};
|
||||||
DWORD hash_pos = 0;
|
DWORD hash_pos = 0;
|
||||||
|
@ -531,34 +534,32 @@ static HRESULT WINAPI HTMLLocation_get_hash(IHTMLLocation *iface, BSTR *p)
|
||||||
|
|
||||||
static HRESULT WINAPI HTMLLocation_reload(IHTMLLocation *iface, VARIANT_BOOL flag)
|
static HRESULT WINAPI HTMLLocation_reload(IHTMLLocation *iface, VARIANT_BOOL flag)
|
||||||
{
|
{
|
||||||
HTMLLocation *This = HTMLLOCATION_THIS(iface);
|
HTMLLocation *This = impl_from_IHTMLLocation(iface);
|
||||||
FIXME("(%p)->(%x)\n", This, flag);
|
FIXME("(%p)->(%x)\n", This, flag);
|
||||||
return E_NOTIMPL;
|
return E_NOTIMPL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI HTMLLocation_replace(IHTMLLocation *iface, BSTR bstr)
|
static HRESULT WINAPI HTMLLocation_replace(IHTMLLocation *iface, BSTR bstr)
|
||||||
{
|
{
|
||||||
HTMLLocation *This = HTMLLOCATION_THIS(iface);
|
HTMLLocation *This = impl_from_IHTMLLocation(iface);
|
||||||
FIXME("(%p)->(%s)\n", This, debugstr_w(bstr));
|
FIXME("(%p)->(%s)\n", This, debugstr_w(bstr));
|
||||||
return E_NOTIMPL;
|
return E_NOTIMPL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI HTMLLocation_assign(IHTMLLocation *iface, BSTR bstr)
|
static HRESULT WINAPI HTMLLocation_assign(IHTMLLocation *iface, BSTR bstr)
|
||||||
{
|
{
|
||||||
HTMLLocation *This = HTMLLOCATION_THIS(iface);
|
HTMLLocation *This = impl_from_IHTMLLocation(iface);
|
||||||
FIXME("(%p)->(%s)\n", This, debugstr_w(bstr));
|
FIXME("(%p)->(%s)\n", This, debugstr_w(bstr));
|
||||||
return E_NOTIMPL;
|
return E_NOTIMPL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI HTMLLocation_toString(IHTMLLocation *iface, BSTR *String)
|
static HRESULT WINAPI HTMLLocation_toString(IHTMLLocation *iface, BSTR *String)
|
||||||
{
|
{
|
||||||
HTMLLocation *This = HTMLLOCATION_THIS(iface);
|
HTMLLocation *This = impl_from_IHTMLLocation(iface);
|
||||||
FIXME("(%p)->(%p)\n", This, String);
|
FIXME("(%p)->(%p)\n", This, String);
|
||||||
return E_NOTIMPL;
|
return E_NOTIMPL;
|
||||||
}
|
}
|
||||||
|
|
||||||
#undef HTMLLOCATION_THIS
|
|
||||||
|
|
||||||
static const IHTMLLocationVtbl HTMLLocationVtbl = {
|
static const IHTMLLocationVtbl HTMLLocationVtbl = {
|
||||||
HTMLLocation_QueryInterface,
|
HTMLLocation_QueryInterface,
|
||||||
HTMLLocation_AddRef,
|
HTMLLocation_AddRef,
|
||||||
|
@ -609,11 +610,11 @@ HRESULT HTMLLocation_Create(HTMLWindow *window, HTMLLocation **ret)
|
||||||
if(!location)
|
if(!location)
|
||||||
return E_OUTOFMEMORY;
|
return E_OUTOFMEMORY;
|
||||||
|
|
||||||
location->lpHTMLLocationVtbl = &HTMLLocationVtbl;
|
location->IHTMLLocation_iface.lpVtbl = &HTMLLocationVtbl;
|
||||||
location->ref = 1;
|
location->ref = 1;
|
||||||
location->window = window;
|
location->window = window;
|
||||||
|
|
||||||
init_dispex(&location->dispex, (IUnknown*)HTMLLOCATION(location), &HTMLLocation_dispex);
|
init_dispex(&location->dispex, (IUnknown*)&location->IHTMLLocation_iface, &HTMLLocation_dispex);
|
||||||
|
|
||||||
*ret = location;
|
*ret = location;
|
||||||
return S_OK;
|
return S_OK;
|
||||||
|
|
|
@ -124,7 +124,7 @@ static void release_children(HTMLWindow *This)
|
||||||
static HRESULT get_location(HTMLWindow *This, HTMLLocation **ret)
|
static HRESULT get_location(HTMLWindow *This, HTMLLocation **ret)
|
||||||
{
|
{
|
||||||
if(This->location) {
|
if(This->location) {
|
||||||
IHTMLLocation_AddRef(HTMLLOCATION(This->location));
|
IHTMLLocation_AddRef(&This->location->IHTMLLocation_iface);
|
||||||
}else {
|
}else {
|
||||||
HRESULT hres;
|
HRESULT hres;
|
||||||
|
|
||||||
|
@ -249,7 +249,7 @@ static ULONG WINAPI HTMLWindow2_Release(IHTMLWindow2 *iface)
|
||||||
|
|
||||||
if(This->location) {
|
if(This->location) {
|
||||||
This->location->window = NULL;
|
This->location->window = NULL;
|
||||||
IHTMLLocation_Release(HTMLLOCATION(This->location));
|
IHTMLLocation_Release(&This->location->IHTMLLocation_iface);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(This->screen)
|
if(This->screen)
|
||||||
|
@ -688,7 +688,7 @@ static HRESULT WINAPI HTMLWindow2_get_location(IHTMLWindow2 *iface, IHTMLLocatio
|
||||||
if(FAILED(hres))
|
if(FAILED(hres))
|
||||||
return hres;
|
return hres;
|
||||||
|
|
||||||
*p = HTMLLOCATION(location);
|
*p = &location->IHTMLLocation_iface;
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1986,7 +1986,7 @@ static HRESULT WINAPI WindowDispEx_InvokeEx(IDispatchEx *iface, DISPID id, LCID
|
||||||
|
|
||||||
hres = IDispatchEx_InvokeEx(&location->dispex.IDispatchEx_iface, DISPID_VALUE, lcid,
|
hres = IDispatchEx_InvokeEx(&location->dispex.IDispatchEx_iface, DISPID_VALUE, lcid,
|
||||||
wFlags, pdp, pvarRes, pei, pspCaller);
|
wFlags, pdp, pvarRes, pei, pspCaller);
|
||||||
IHTMLLocation_Release(HTMLLOCATION(location));
|
IHTMLLocation_Release(&location->IHTMLLocation_iface);
|
||||||
return hres;
|
return hres;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -246,7 +246,7 @@ typedef struct {
|
||||||
|
|
||||||
struct HTMLLocation {
|
struct HTMLLocation {
|
||||||
DispatchEx dispex;
|
DispatchEx dispex;
|
||||||
const IHTMLLocationVtbl *lpHTMLLocationVtbl;
|
IHTMLLocation IHTMLLocation_iface;
|
||||||
|
|
||||||
LONG ref;
|
LONG ref;
|
||||||
|
|
||||||
|
@ -630,8 +630,6 @@ struct HTMLDocumentNode {
|
||||||
#define STATUSCLB(x) ((IBindStatusCallback*) &(x)->lpBindStatusCallbackVtbl)
|
#define STATUSCLB(x) ((IBindStatusCallback*) &(x)->lpBindStatusCallbackVtbl)
|
||||||
#define BINDINFO(x) ((IInternetBindInfo*) &(x)->lpInternetBindInfoVtbl);
|
#define BINDINFO(x) ((IInternetBindInfo*) &(x)->lpInternetBindInfoVtbl);
|
||||||
|
|
||||||
#define HTMLLOCATION(x) ((IHTMLLocation*) &(x)->lpHTMLLocationVtbl)
|
|
||||||
|
|
||||||
#define DEFINE_THIS(cls,ifc,iface) ((cls*)((BYTE*)(iface)-offsetof(cls,lp ## ifc ## Vtbl)))
|
#define DEFINE_THIS(cls,ifc,iface) ((cls*)((BYTE*)(iface)-offsetof(cls,lp ## ifc ## Vtbl)))
|
||||||
|
|
||||||
HRESULT HTMLDocument_Create(IUnknown*,REFIID,void**);
|
HRESULT HTMLDocument_Create(IUnknown*,REFIID,void**);
|
||||||
|
|
Loading…
Reference in New Issue