diff --git a/dlls/urlmon/binding.c b/dlls/urlmon/binding.c index d8e3e637c94..ba6f564813b 100644 --- a/dlls/urlmon/binding.c +++ b/dlls/urlmon/binding.c @@ -78,7 +78,7 @@ typedef enum { struct Binding { const IBindingVtbl *lpBindingVtbl; - const IInternetProtocolSinkVtbl *lpInternetProtocolSinkVtbl; + const IInternetProtocolSinkVtbl *lpIInternetProtocolSinkVtbl; const IInternetBindInfoVtbl *lpInternetBindInfoVtbl; const IWinInetHttpInfoVtbl *lpWinInetHttpInfoVtbl; const IServiceProviderVtbl *lpServiceProviderVtbl; @@ -112,7 +112,6 @@ struct Binding { }; #define BINDING(x) ((IBinding*) &(x)->lpBindingVtbl) -#define PROTSINK(x) ((IInternetProtocolSink*) &(x)->lpInternetProtocolSinkVtbl) #define BINDINF(x) ((IInternetBindInfo*) &(x)->lpInternetBindInfoVtbl) #define INETINFO(x) ((IWinInetHttpInfo*) &(x)->lpWinInetHttpInfoVtbl) #define SERVPROV(x) ((IServiceProvider*) &(x)->lpServiceProviderVtbl) @@ -916,7 +915,7 @@ static const IBindingVtbl BindingVtbl = { Binding_GetBindResult }; -#define PROTSINK_THIS(iface) DEFINE_THIS(Binding, InternetProtocolSink, iface) +#define PROTSINK_THIS(iface) DEFINE_THIS(Binding, IInternetProtocolSink, iface) static HRESULT WINAPI InternetProtocolSink_QueryInterface(IInternetProtocolSink *iface, REFIID riid, void **ppv) @@ -1360,7 +1359,7 @@ static HRESULT Binding_Create(IMoniker *mon, Binding *binding_ctx, LPCWSTR url, ret = heap_alloc_zero(sizeof(Binding)); ret->lpBindingVtbl = &BindingVtbl; - ret->lpInternetProtocolSinkVtbl = &InternetProtocolSinkVtbl; + ret->lpIInternetProtocolSinkVtbl = &InternetProtocolSinkVtbl; ret->lpInternetBindInfoVtbl = &InternetBindInfoVtbl; ret->lpWinInetHttpInfoVtbl = &WinInetHttpInfoVtbl; ret->lpServiceProviderVtbl = &ServiceProviderVtbl; diff --git a/dlls/urlmon/bindprot.c b/dlls/urlmon/bindprot.c index 0001fcc713f..3289b847360 100644 --- a/dlls/urlmon/bindprot.c +++ b/dlls/urlmon/bindprot.c @@ -33,11 +33,11 @@ typedef struct _task_header_t { } task_header_t; struct BindProtocol { - const IInternetProtocolVtbl *lpInternetProtocolVtbl; - const IInternetBindInfoVtbl *lpInternetBindInfoVtbl; - const IInternetPriorityVtbl *lpInternetPriorityVtbl; - const IServiceProviderVtbl *lpServiceProviderVtbl; - const IInternetProtocolSinkVtbl *lpInternetProtocolSinkVtbl; + const IInternetProtocolVtbl *lpIInternetProtocolVtbl; + const IInternetBindInfoVtbl *lpInternetBindInfoVtbl; + const IInternetPriorityVtbl *lpInternetPriorityVtbl; + const IServiceProviderVtbl *lpServiceProviderVtbl; + const IInternetProtocolSinkVtbl *lpIInternetProtocolSinkVtbl; const IInternetProtocolVtbl *lpIInternetProtocolHandlerVtbl; @@ -70,11 +70,9 @@ struct BindProtocol { LPWSTR url; }; -#define PROTOCOL(x) ((IInternetProtocol*) &(x)->lpInternetProtocolVtbl) #define BINDINFO(x) ((IInternetBindInfo*) &(x)->lpInternetBindInfoVtbl) #define PRIORITY(x) ((IInternetPriority*) &(x)->lpInternetPriorityVtbl) #define SERVPROV(x) ((IServiceProvider*) &(x)->lpServiceProviderVtbl) -#define PROTSINK(x) ((IInternetProtocolSink*) &(x)->lpInternetProtocolSinkVtbl) #define PROTOCOLHANDLER(x) ((IInternetProtocol*) &(x)->lpIInternetProtocolHandlerVtbl) @@ -234,7 +232,7 @@ static void mime_available(BindProtocol *This, LPCWSTR mime, BOOL verified) } } -#define PROTOCOL_THIS(iface) DEFINE_THIS(BindProtocol, InternetProtocol, iface) +#define PROTOCOL_THIS(iface) DEFINE_THIS(BindProtocol, IInternetProtocol, iface) static HRESULT WINAPI BindProtocol_QueryInterface(IInternetProtocol *iface, REFIID riid, void **ppv) { @@ -792,7 +790,7 @@ static const IInternetPriorityVtbl InternetPriorityVtbl = { }; -#define PROTSINK_THIS(iface) DEFINE_THIS(BindProtocol, InternetProtocolSink, iface) +#define PROTSINK_THIS(iface) DEFINE_THIS(BindProtocol, IInternetProtocolSink, iface) static HRESULT WINAPI BPInternetProtocolSink_QueryInterface(IInternetProtocolSink *iface, REFIID riid, void **ppv) @@ -1118,11 +1116,11 @@ HRESULT create_binding_protocol(LPCWSTR url, BOOL from_urlmon, IInternetProtocol { BindProtocol *ret = heap_alloc_zero(sizeof(BindProtocol)); - ret->lpInternetProtocolVtbl = &BindProtocolVtbl; - ret->lpInternetBindInfoVtbl = &InternetBindInfoVtbl; - ret->lpInternetPriorityVtbl = &InternetPriorityVtbl; - ret->lpServiceProviderVtbl = &ServiceProviderVtbl; - ret->lpInternetProtocolSinkVtbl = &InternetProtocolSinkVtbl; + ret->lpIInternetProtocolVtbl = &BindProtocolVtbl; + ret->lpInternetBindInfoVtbl = &InternetBindInfoVtbl; + ret->lpInternetPriorityVtbl = &InternetPriorityVtbl; + ret->lpServiceProviderVtbl = &ServiceProviderVtbl; + ret->lpIInternetProtocolSinkVtbl = &InternetProtocolSinkVtbl; ret->lpIInternetProtocolHandlerVtbl = &InternetProtocolHandlerVtbl; ret->ref = 1; diff --git a/dlls/urlmon/file.c b/dlls/urlmon/file.c index 1e3db1681ee..ed4802b8a3b 100644 --- a/dlls/urlmon/file.c +++ b/dlls/urlmon/file.c @@ -22,7 +22,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(urlmon); typedef struct { - const IInternetProtocolVtbl *lpInternetProtocolVtbl; + const IInternetProtocolVtbl *lpIInternetProtocolVtbl; const IInternetPriorityVtbl *lpInternetPriorityVtbl; HANDLE file; @@ -31,10 +31,9 @@ typedef struct { LONG ref; } FileProtocol; -#define PROTOCOL(x) ((IInternetProtocol*) &(x)->lpInternetProtocolVtbl) #define PRIORITY(x) ((IInternetPriority*) &(x)->lpInternetPriorityVtbl) -#define PROTOCOL_THIS(iface) DEFINE_THIS(FileProtocol, InternetProtocol, iface) +#define PROTOCOL_THIS(iface) DEFINE_THIS(FileProtocol, IInternetProtocol, iface) static HRESULT WINAPI FileProtocol_QueryInterface(IInternetProtocol *iface, REFIID riid, void **ppv) { @@ -360,7 +359,7 @@ HRESULT FileProtocol_Construct(IUnknown *pUnkOuter, LPVOID *ppobj) ret = heap_alloc(sizeof(FileProtocol)); - ret->lpInternetProtocolVtbl = &FileProtocolVtbl; + ret->lpIInternetProtocolVtbl = &FileProtocolVtbl; ret->lpInternetPriorityVtbl = &FilePriorityVtbl; ret->file = NULL; ret->priority = 0; diff --git a/dlls/urlmon/ftp.c b/dlls/urlmon/ftp.c index c6789e583c3..c27e7008733 100644 --- a/dlls/urlmon/ftp.c +++ b/dlls/urlmon/ftp.c @@ -24,14 +24,13 @@ WINE_DEFAULT_DEBUG_CHANNEL(urlmon); typedef struct { Protocol base; - const IInternetProtocolVtbl *lpInternetProtocolVtbl; + const IInternetProtocolVtbl *lpIInternetProtocolVtbl; const IInternetPriorityVtbl *lpInternetPriorityVtbl; const IWinInetHttpInfoVtbl *lpWinInetHttpInfoVtbl; LONG ref; } FtpProtocol; -#define PROTOCOL(x) ((IInternetProtocol*) &(x)->lpInternetProtocolVtbl) #define PRIORITY(x) ((IInternetPriority*) &(x)->lpInternetPriorityVtbl) #define INETHTTPINFO(x) ((IWinInetHttpInfo*) &(x)->lpWinInetHttpInfoVtbl) @@ -80,7 +79,7 @@ static const ProtocolVtbl AsyncProtocolVtbl = { FtpProtocol_close_connection }; -#define PROTOCOL_THIS(iface) DEFINE_THIS(FtpProtocol, InternetProtocol, iface) +#define PROTOCOL_THIS(iface) DEFINE_THIS(FtpProtocol, IInternetProtocol, iface) static HRESULT WINAPI FtpProtocol_QueryInterface(IInternetProtocol *iface, REFIID riid, void **ppv) { @@ -360,9 +359,9 @@ HRESULT FtpProtocol_Construct(IUnknown *pUnkOuter, LPVOID *ppobj) ret = heap_alloc_zero(sizeof(FtpProtocol)); ret->base.vtbl = &AsyncProtocolVtbl; - ret->lpInternetProtocolVtbl = &FtpProtocolVtbl; - ret->lpInternetPriorityVtbl = &FtpPriorityVtbl; - ret->lpWinInetHttpInfoVtbl = &WinInetHttpInfoVtbl; + ret->lpIInternetProtocolVtbl = &FtpProtocolVtbl; + ret->lpInternetPriorityVtbl = &FtpPriorityVtbl; + ret->lpWinInetHttpInfoVtbl = &WinInetHttpInfoVtbl; ret->ref = 1; *ppobj = PROTOCOL(ret); diff --git a/dlls/urlmon/gopher.c b/dlls/urlmon/gopher.c index f2abcddc8ed..fa5c14cf9ed 100644 --- a/dlls/urlmon/gopher.c +++ b/dlls/urlmon/gopher.c @@ -24,13 +24,12 @@ WINE_DEFAULT_DEBUG_CHANNEL(urlmon); typedef struct { Protocol base; - const IInternetProtocolVtbl *lpInternetProtocolVtbl; + const IInternetProtocolVtbl *lpIInternetProtocolVtbl; const IInternetPriorityVtbl *lpInternetPriorityVtbl; LONG ref; } GopherProtocol; -#define PROTOCOL(x) ((IInternetProtocol*) &(x)->lpInternetProtocolVtbl) #define PRIORITY(x) ((IInternetPriority*) &(x)->lpInternetPriorityVtbl) #define ASYNCPROTOCOL_THIS(iface) DEFINE_THIS2(GopherProtocol, base, iface) @@ -67,7 +66,7 @@ static const ProtocolVtbl AsyncProtocolVtbl = { GopherProtocol_close_connection }; -#define PROTOCOL_THIS(iface) DEFINE_THIS(GopherProtocol, InternetProtocol, iface) +#define PROTOCOL_THIS(iface) DEFINE_THIS(GopherProtocol, IInternetProtocol, iface) static HRESULT WINAPI GopherProtocol_QueryInterface(IInternetProtocol *iface, REFIID riid, void **ppv) { @@ -289,8 +288,8 @@ HRESULT GopherProtocol_Construct(IUnknown *pUnkOuter, LPVOID *ppobj) ret = heap_alloc_zero(sizeof(GopherProtocol)); ret->base.vtbl = &AsyncProtocolVtbl; - ret->lpInternetProtocolVtbl = &GopherProtocolVtbl; - ret->lpInternetPriorityVtbl = &GopherPriorityVtbl; + ret->lpIInternetProtocolVtbl = &GopherProtocolVtbl; + ret->lpInternetPriorityVtbl = &GopherPriorityVtbl; ret->ref = 1; *ppobj = PROTOCOL(ret); diff --git a/dlls/urlmon/http.c b/dlls/urlmon/http.c index 9c11d4104c2..272b338779c 100644 --- a/dlls/urlmon/http.c +++ b/dlls/urlmon/http.c @@ -32,7 +32,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(urlmon); typedef struct { Protocol base; - const IInternetProtocolVtbl *lpInternetProtocolVtbl; + const IInternetProtocolVtbl *lpIInternetProtocolVtbl; const IInternetPriorityVtbl *lpInternetPriorityVtbl; const IWinInetHttpInfoVtbl *lpWinInetHttpInfoVtbl; @@ -43,7 +43,6 @@ typedef struct { LONG ref; } HttpProtocol; -#define PROTOCOL(x) ((IInternetProtocol*) &(x)->lpInternetProtocolVtbl) #define PRIORITY(x) ((IInternetPriority*) &(x)->lpInternetPriorityVtbl) #define INETHTTPINFO(x) ((IWinInetHttpInfo*) &(x)->lpWinInetHttpInfoVtbl) @@ -309,7 +308,7 @@ static const ProtocolVtbl AsyncProtocolVtbl = { HttpProtocol_close_connection }; -#define PROTOCOL_THIS(iface) DEFINE_THIS(HttpProtocol, InternetProtocol, iface) +#define PROTOCOL_THIS(iface) DEFINE_THIS(HttpProtocol, IInternetProtocol, iface) static HRESULT WINAPI HttpProtocol_QueryInterface(IInternetProtocol *iface, REFIID riid, void **ppv) { @@ -590,9 +589,9 @@ static HRESULT create_http_protocol(BOOL https, void **ppobj) return E_OUTOFMEMORY; ret->base.vtbl = &AsyncProtocolVtbl; - ret->lpInternetProtocolVtbl = &HttpProtocolVtbl; - ret->lpInternetPriorityVtbl = &HttpPriorityVtbl; - ret->lpWinInetHttpInfoVtbl = &WinInetHttpInfoVtbl; + ret->lpIInternetProtocolVtbl = &HttpProtocolVtbl; + ret->lpInternetPriorityVtbl = &HttpPriorityVtbl; + ret->lpWinInetHttpInfoVtbl = &WinInetHttpInfoVtbl; ret->https = https; ret->ref = 1; diff --git a/dlls/urlmon/mk.c b/dlls/urlmon/mk.c index 934eeda8ef7..0befe5c34c6 100644 --- a/dlls/urlmon/mk.c +++ b/dlls/urlmon/mk.c @@ -22,16 +22,14 @@ WINE_DEFAULT_DEBUG_CHANNEL(urlmon); typedef struct { - const IInternetProtocolVtbl *lpInternetProtocolVtbl; + const IInternetProtocolVtbl *lpIInternetProtocolVtbl; LONG ref; IStream *stream; } MkProtocol; -#define PROTOCOL_THIS(iface) DEFINE_THIS(MkProtocol, InternetProtocol, iface) - -#define PROTOCOL(x) ((IInternetProtocol*) &(x)->lpInternetProtocolVtbl) +#define PROTOCOL_THIS(iface) DEFINE_THIS(MkProtocol, IInternetProtocol, iface) static HRESULT WINAPI MkProtocol_QueryInterface(IInternetProtocol *iface, REFIID riid, void **ppv) { @@ -293,7 +291,7 @@ HRESULT MkProtocol_Construct(IUnknown *pUnkOuter, LPVOID *ppobj) ret = heap_alloc(sizeof(MkProtocol)); - ret->lpInternetProtocolVtbl = &MkProtocolVtbl; + ret->lpIInternetProtocolVtbl = &MkProtocolVtbl; ret->ref = 1; ret->stream = NULL; diff --git a/dlls/urlmon/urlmon_main.h b/dlls/urlmon/urlmon_main.h index c3f944854ad..505e575e994 100644 --- a/dlls/urlmon/urlmon_main.h +++ b/dlls/urlmon/urlmon_main.h @@ -107,6 +107,9 @@ HRESULT protocol_lock_request(Protocol*); HRESULT protocol_unlock_request(Protocol*); void protocol_close_connection(Protocol*); +#define PROTOCOL(x) ((IInternetProtocol*) &(x)->lpIInternetProtocolVtbl) +#define PROTSINK(x) ((IInternetProtocolSink*) &(x)->lpIInternetProtocolSinkVtbl) + typedef struct { HWND notif_hwnd; DWORD notif_hwnd_cnt;