Commit 3636a252 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

urlmon: Added better debug traces for BINDSTATUS values.

parent c21000ea
......@@ -158,7 +158,7 @@ static HRESULT WINAPI BindStatusCallback_OnProgress(IBindStatusCallbackEx *iface
{
BindStatusCallback *This = impl_from_IBindStatusCallbackEx(iface);
TRACE("%p)->(%u %u %u %s)\n", This, ulProgress, ulProgressMax, ulStatusCode,
TRACE("%p)->(%u %u %s %s)\n", This, ulProgress, ulProgressMax, debugstr_bindstatus(ulStatusCode),
debugstr_w(szStatusText));
return IBindStatusCallback_OnProgress(This->callback, ulProgress,
......
......@@ -980,7 +980,7 @@ static HRESULT WINAPI InternetProtocolSink_ReportProgress(IInternetProtocolSink
{
Binding *This = impl_from_IInternetProtocolSink(iface);
TRACE("(%p)->(%u %s)\n", This, ulStatusCode, debugstr_w(szStatusText));
TRACE("(%p)->(%s %s)\n", This, debugstr_bindstatus(ulStatusCode), debugstr_w(szStatusText));
switch(ulStatusCode) {
case BINDSTATUS_FINDINGRESOURCE:
......@@ -1133,6 +1133,7 @@ static HRESULT WINAPI InternetProtocolSink_ReportResult(IInternetProtocolSink *i
TRACE("(%p)->(%08x %d %s)\n", This, hrResult, dwError, debugstr_w(szResult));
stop_binding(This, hrResult, szResult);
IInternetProtocolEx_Terminate(&This->protocol->IInternetProtocolEx_iface, 0);
return S_OK;
}
......
......@@ -822,7 +822,7 @@ static HRESULT WINAPI ProtocolSinkHandler_ReportProgress(IInternetProtocolSink *
{
BindProtocol *This = impl_from_IInternetProtocolSinkHandler(iface);
TRACE("(%p)->(%u %s)\n", This, status_code, debugstr_w(status_text));
TRACE("(%p)->(%s %s)\n", This, debugstr_bindstatus(status_code), debugstr_w(status_text));
if(!This->protocol_sink)
return S_OK;
......
......@@ -166,6 +166,67 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad)
return TRUE;
}
const char *debugstr_bindstatus(ULONG status)
{
switch(status) {
#define X(x) case x: return #x; break
X(BINDSTATUS_FINDINGRESOURCE);
X(BINDSTATUS_CONNECTING);
X(BINDSTATUS_REDIRECTING);
X(BINDSTATUS_BEGINDOWNLOADDATA);
X(BINDSTATUS_DOWNLOADINGDATA);
X(BINDSTATUS_ENDDOWNLOADDATA);
X(BINDSTATUS_BEGINDOWNLOADCOMPONENTS);
X(BINDSTATUS_INSTALLINGCOMPONENTS);
X(BINDSTATUS_ENDDOWNLOADCOMPONENTS);
X(BINDSTATUS_USINGCACHEDCOPY);
X(BINDSTATUS_SENDINGREQUEST);
X(BINDSTATUS_CLASSIDAVAILABLE);
X(BINDSTATUS_MIMETYPEAVAILABLE);
X(BINDSTATUS_CACHEFILENAMEAVAILABLE);
X(BINDSTATUS_BEGINSYNCOPERATION);
X(BINDSTATUS_ENDSYNCOPERATION);
X(BINDSTATUS_BEGINUPLOADDATA);
X(BINDSTATUS_UPLOADINGDATA);
X(BINDSTATUS_ENDUPLOADINGDATA);
X(BINDSTATUS_PROTOCOLCLASSID);
X(BINDSTATUS_ENCODING);
X(BINDSTATUS_VERIFIEDMIMETYPEAVAILABLE);
X(BINDSTATUS_CLASSINSTALLLOCATION);
X(BINDSTATUS_DECODING);
X(BINDSTATUS_LOADINGMIMEHANDLER);
X(BINDSTATUS_CONTENTDISPOSITIONATTACH);
X(BINDSTATUS_FILTERREPORTMIMETYPE);
X(BINDSTATUS_CLSIDCANINSTANTIATE);
X(BINDSTATUS_IUNKNOWNAVAILABLE);
X(BINDSTATUS_DIRECTBIND);
X(BINDSTATUS_RAWMIMETYPE);
X(BINDSTATUS_PROXYDETECTING);
X(BINDSTATUS_ACCEPTRANGES);
X(BINDSTATUS_COOKIE_SENT);
X(BINDSTATUS_COMPACT_POLICY_RECEIVED);
X(BINDSTATUS_COOKIE_SUPPRESSED);
X(BINDSTATUS_COOKIE_STATE_UNKNOWN);
X(BINDSTATUS_COOKIE_STATE_ACCEPT);
X(BINDSTATUS_COOKIE_STATE_REJECT);
X(BINDSTATUS_COOKIE_STATE_PROMPT);
X(BINDSTATUS_COOKIE_STATE_LEASH);
X(BINDSTATUS_COOKIE_STATE_DOWNGRADE);
X(BINDSTATUS_POLICY_HREF);
X(BINDSTATUS_P3P_HEADER);
X(BINDSTATUS_SESSION_COOKIE_RECEIVED);
X(BINDSTATUS_PERSISTENT_COOKIE_RECEIVED);
X(BINDSTATUS_SESSION_COOKIES_ALLOWED);
X(BINDSTATUS_CACHECONTROL);
X(BINDSTATUS_CONTENTDISPOSITIONFILENAME);
X(BINDSTATUS_MIMETEXTPLAINMISMATCH);
X(BINDSTATUS_PUBLISHERAVAILABLE);
X(BINDSTATUS_DISPLAYNAMEAVAILABLE);
#undef X
default:
return wine_dbg_sprintf("(invalid status %u)", status);
}
}
/***********************************************************************
* DllInstall (URLMON.@)
......
......@@ -221,6 +221,8 @@ tls_data_t *get_tls_data(void) DECLSPEC_HIDDEN;
HWND get_notif_hwnd(void) DECLSPEC_HIDDEN;
void release_notif_hwnd(HWND) DECLSPEC_HIDDEN;
const char *debugstr_bindstatus(ULONG) DECLSPEC_HIDDEN;
static inline void *heap_alloc(size_t len)
{
return HeapAlloc(GetProcessHeap(), 0, len);
......
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