Commit 6e5c2f96 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

urlmon: Make HttpProtocol implementation vtbl offset independent.

parent 6b505e14
......@@ -77,6 +77,9 @@ typedef struct {
LONG ref;
} HttpProtocol;
#define PROTOCOL(x) ((IInternetProtocol*) &(x)->lpInternetProtocolVtbl)
#define PRIORITY(x) ((IInternetPriority*) &(x)->lpInternetPriorityVtbl)
/* Default headers from native */
static const WCHAR wszHeaders[] = {'A','c','c','e','p','t','-','E','n','c','o','d','i','n','g',
':',' ','g','z','i','p',',',' ','d','e','f','l','a','t','e',0};
......@@ -186,10 +189,10 @@ static void CALLBACK HTTPPROTOCOL_InternetStatusCallback(
if (This->grfBINDF & BINDF_FROMURLMON)
IInternetProtocolSink_Switch(This->protocol_sink, &data);
else
IInternetProtocol_Continue((IInternetProtocol *)This, &data);
IInternetProtocol_Continue(PROTOCOL(This), &data);
return;
case INTERNET_STATUS_HANDLE_CREATED:
IInternetProtocol_AddRef((IInternetProtocol *)This);
IInternetProtocol_AddRef(PROTOCOL(This));
return;
case INTERNET_STATUS_HANDLE_CLOSING:
if (*(HINTERNET *)lpvStatusInformation == This->connect)
......@@ -210,7 +213,7 @@ static void CALLBACK HTTPPROTOCOL_InternetStatusCallback(
memset(&This->bind_info, 0, sizeof(This->bind_info));
}
}
IInternetProtocol_Release((IInternetProtocol *)This);
IInternetProtocol_Release(PROTOCOL(This));
return;
default:
WARN("Unhandled Internet status callback %d\n", dwInternetStatus);
......@@ -236,9 +239,6 @@ static inline LPWSTR strndupW(LPCWSTR string, int len)
* Interface implementations
*/
#define PROTOCOL(x) ((IInternetProtocol*) &(x)->lpInternetProtocolVtbl)
#define PRIORITY(x) ((IInternetPriority*) &(x)->lpInternetPriorityVtbl)
#define PROTOCOL_THIS(iface) DEFINE_THIS(HttpProtocol, InternetProtocol, iface)
static HRESULT WINAPI HttpProtocol_QueryInterface(IInternetProtocol *iface, REFIID riid, void **ppv)
......
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