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

shdocvw: Improved debug messages.

parent 2245c9b1
......@@ -252,6 +252,8 @@ HRESULT register_class_object(BOOL);
HRESULT get_typeinfo(ITypeInfo**);
DWORD register_iexplore(BOOL);
const char *debugstr_variant(const VARIANT*);
/* memory allocation functions */
static inline void *heap_alloc(size_t len)
......
......@@ -67,6 +67,31 @@ HRESULT get_typeinfo(ITypeInfo **typeinfo)
return hres;
}
const char *debugstr_variant(const VARIANT *v)
{
if(!v)
return "(null)";
switch(V_VT(v)) {
case VT_EMPTY:
return "{VT_EMPTY}";
case VT_NULL:
return "{VT_NULL}";
case VT_I4:
return wine_dbg_sprintf("{VT_I4: %d}", V_I4(v));
case VT_R8:
return wine_dbg_sprintf("{VT_R8: %lf}", V_R8(v));
case VT_BSTR:
return wine_dbg_sprintf("{VT_BSTR: %s}", debugstr_w(V_BSTR(v)));
case VT_DISPATCH:
return wine_dbg_sprintf("{VT_DISPATCH: %p}", V_DISPATCH(v));
case VT_BOOL:
return wine_dbg_sprintf("{VT_BOOL: %x}", V_BOOL(v));
default:
return wine_dbg_sprintf("{vt %d}", V_VT(v));
}
}
/*************************************************************************
* SHDOCVW DllMain
*/
......
......@@ -269,8 +269,9 @@ static HRESULT WINAPI WebBrowser_Navigate(IWebBrowser2 *iface, BSTR szUrl,
{
WebBrowser *This = WEBBROWSER_THIS(iface);
TRACE("(%p)->(%s %p %p %p %p)\n", This, debugstr_w(szUrl), Flags, TargetFrameName,
PostData, Headers);
TRACE("(%p)->(%s %s %s %s %s)\n", This, debugstr_w(szUrl), debugstr_variant(Flags),
debugstr_variant(TargetFrameName), debugstr_variant(PostData),
debugstr_variant(Headers));
return navigate_url(&This->doc_host, szUrl, Flags, TargetFrameName, PostData, Headers);
}
......@@ -285,7 +286,7 @@ static HRESULT WINAPI WebBrowser_Refresh(IWebBrowser2 *iface)
static HRESULT WINAPI WebBrowser_Refresh2(IWebBrowser2 *iface, VARIANT *Level)
{
WebBrowser *This = WEBBROWSER_THIS(iface);
FIXME("(%p)->(%p)\n", This, Level);
FIXME("(%p)->(%s)\n", This, debugstr_variant(Level));
return E_NOTIMPL;
}
......@@ -516,14 +517,14 @@ static HRESULT WINAPI WebBrowser_ClientToWindow(IWebBrowser2 *iface, int *pcx, i
static HRESULT WINAPI WebBrowser_PutProperty(IWebBrowser2 *iface, BSTR szProperty, VARIANT vtValue)
{
WebBrowser *This = WEBBROWSER_THIS(iface);
FIXME("(%p)->(%s)\n", This, debugstr_w(szProperty));
FIXME("(%p)->(%s %s)\n", This, debugstr_w(szProperty), debugstr_variant(&vtValue));
return E_NOTIMPL;
}
static HRESULT WINAPI WebBrowser_GetProperty(IWebBrowser2 *iface, BSTR szProperty, VARIANT *pvtValue)
{
WebBrowser *This = WEBBROWSER_THIS(iface);
FIXME("(%p)->(%s %p)\n", This, debugstr_w(szProperty), pvtValue);
FIXME("(%p)->(%s %s)\n", This, debugstr_w(szProperty), debugstr_variant(pvtValue));
return E_NOTIMPL;
}
......@@ -726,7 +727,8 @@ static HRESULT WINAPI WebBrowser_Navigate2(IWebBrowser2 *iface, VARIANT *URL, VA
WebBrowser *This = WEBBROWSER_THIS(iface);
LPCWSTR url;
TRACE("(%p)->(%p %p %p %p %p)\n", This, URL, Flags, TargetFrameName, PostData, Headers);
TRACE("(%p)->(%s %s %s %s %s)\n", This, debugstr_variant(URL), debugstr_variant(Flags),
debugstr_variant(TargetFrameName), debugstr_variant(PostData), debugstr_variant(Headers));
if(!This->client)
return E_FAIL;
......@@ -761,7 +763,7 @@ static HRESULT WINAPI WebBrowser_ExecWB(IWebBrowser2 *iface, OLECMDID cmdID,
OLECMDEXECOPT cmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut)
{
WebBrowser *This = WEBBROWSER_THIS(iface);
FIXME("(%p)->(%d %d %p %p)\n", This, cmdID, cmdexecopt, pvaIn, pvaOut);
FIXME("(%p)->(%d %d %s %p)\n", This, cmdID, cmdexecopt, debugstr_variant(pvaIn), pvaOut);
return E_NOTIMPL;
}
......@@ -769,7 +771,8 @@ static HRESULT WINAPI WebBrowser_ShowBrowserBar(IWebBrowser2 *iface, VARIANT *pv
VARIANT *pvarShow, VARIANT *pvarSize)
{
WebBrowser *This = WEBBROWSER_THIS(iface);
FIXME("(%p)->(%p %p %p)\n", This, pvaClsid, pvarShow, pvarSize);
FIXME("(%p)->(%s %s %s)\n", This, debugstr_variant(pvaClsid), debugstr_variant(pvarShow),
debugstr_variant(pvarSize));
return E_NOTIMPL;
}
......
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