mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-02 19:26:32 +00:00
- Sync spoolss, sxs, urlmon with Wine 1.1.20
svn path=/trunk/; revision=40815
This commit is contained in:
@@ -270,7 +270,7 @@ BOOL backend_load_all(void)
|
||||
|
||||
EnterCriticalSection(&backend_cs);
|
||||
|
||||
/* if we failed before, dont try again */
|
||||
/* if we failed before, don't try again */
|
||||
if (!failed && (used_backends == 0)) {
|
||||
pb = backend_load(localsplW, NULL, NULL);
|
||||
|
||||
|
||||
@@ -22,7 +22,9 @@
|
||||
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "wine/debug.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(sxs);
|
||||
|
||||
/***********************************************************************
|
||||
* DllMain (SXS.@)
|
||||
@@ -40,3 +42,9 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
HRESULT WINAPI CreateAssemblyCache(DWORD unimplemented, DWORD dwReserved)
|
||||
{
|
||||
FIXME("%u %u stub\n", unimplemented, dwReserved);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
@ stub CreateAssemblyCache
|
||||
@ stdcall CreateAssemblyCache(long long)
|
||||
@ stub CreateAssemblyNameObject
|
||||
|
||||
@@ -80,6 +80,7 @@ struct Binding {
|
||||
const IBindingVtbl *lpBindingVtbl;
|
||||
const IInternetProtocolSinkVtbl *lpInternetProtocolSinkVtbl;
|
||||
const IInternetBindInfoVtbl *lpInternetBindInfoVtbl;
|
||||
const IWinInetHttpInfoVtbl *lpWinInetHttpInfoVtbl;
|
||||
const IServiceProviderVtbl *lpServiceProviderVtbl;
|
||||
|
||||
LONG ref;
|
||||
@@ -117,6 +118,7 @@ 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)
|
||||
|
||||
#define STREAM(x) ((IStream*) &(x)->lpStreamVtbl)
|
||||
@@ -901,6 +903,31 @@ static HRESULT WINAPI Binding_QueryInterface(IBinding *iface, REFIID riid, void
|
||||
}else if(IsEqualGUID(&IID_IServiceProvider, riid)) {
|
||||
TRACE("(%p)->(IID_IServiceProvider %p)\n", This, ppv);
|
||||
*ppv = SERVPROV(This);
|
||||
}else if(IsEqualGUID(&IID_IWinInetInfo, riid)) {
|
||||
TRACE("(%p)->(IID_IWinInetInfo %p)\n", This, ppv);
|
||||
|
||||
/* NOTE: This violidates COM rules, but tests prove that we should do it */
|
||||
if(!get_wininet_info(This->protocol))
|
||||
return E_NOINTERFACE;
|
||||
|
||||
*ppv = INETINFO(This);
|
||||
}else if(IsEqualGUID(&IID_IWinInetHttpInfo, riid)) {
|
||||
IWinInetHttpInfo *http_info;
|
||||
IWinInetInfo *info;
|
||||
HRESULT hres;
|
||||
|
||||
TRACE("(%p)->(IID_IWinInetHttpInfo %p)\n", This, ppv);
|
||||
|
||||
info = get_wininet_info(This->protocol);
|
||||
if(!info)
|
||||
return E_NOINTERFACE;
|
||||
|
||||
hres = IWinInetInfo_QueryInterface(info, &IID_IWinInetHttpInfo, (void**)&http_info);
|
||||
if(FAILED(hres))
|
||||
return E_NOINTERFACE;
|
||||
|
||||
IWinInetHttpInfo_Release(http_info);
|
||||
*ppv = INETINFO(This);
|
||||
}
|
||||
|
||||
if(*ppv) {
|
||||
@@ -1448,6 +1475,52 @@ static const IInternetBindInfoVtbl InternetBindInfoVtbl = {
|
||||
InternetBindInfo_GetBindString
|
||||
};
|
||||
|
||||
#define INETINFO_THIS(iface) DEFINE_THIS(Binding, WinInetHttpInfo, iface)
|
||||
|
||||
static HRESULT WINAPI WinInetHttpInfo_QueryInterface(IWinInetHttpInfo *iface, REFIID riid, void **ppv)
|
||||
{
|
||||
Binding *This = INETINFO_THIS(iface);
|
||||
return IBinding_QueryInterface(BINDING(This), riid, ppv);
|
||||
}
|
||||
|
||||
static ULONG WINAPI WinInetHttpInfo_AddRef(IWinInetHttpInfo *iface)
|
||||
{
|
||||
Binding *This = INETINFO_THIS(iface);
|
||||
return IBinding_AddRef(BINDING(This));
|
||||
}
|
||||
|
||||
static ULONG WINAPI WinInetHttpInfo_Release(IWinInetHttpInfo *iface)
|
||||
{
|
||||
Binding *This = INETINFO_THIS(iface);
|
||||
return IBinding_Release(BINDING(This));
|
||||
}
|
||||
|
||||
static HRESULT WINAPI WinInetHttpInfo_QueryOption(IWinInetHttpInfo *iface, DWORD dwOption,
|
||||
void *pBuffer, DWORD *pcbBuffer)
|
||||
{
|
||||
Binding *This = INETINFO_THIS(iface);
|
||||
FIXME("(%p)->(%x %p %p)\n", This, dwOption, pBuffer, pcbBuffer);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI WinInetHttpInfo_QueryInfo(IWinInetHttpInfo *iface, DWORD dwOption,
|
||||
void *pBuffer, DWORD *pcbBuffer, DWORD *pdwFlags, DWORD *pdwReserved)
|
||||
{
|
||||
Binding *This = INETINFO_THIS(iface);
|
||||
FIXME("(%p)->(%x %p %p %p %p)\n", This, dwOption, pBuffer, pcbBuffer, pdwFlags, pdwReserved);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
#undef INETINFO_THIS
|
||||
|
||||
static const IWinInetHttpInfoVtbl WinInetHttpInfoVtbl = {
|
||||
WinInetHttpInfo_QueryInterface,
|
||||
WinInetHttpInfo_AddRef,
|
||||
WinInetHttpInfo_Release,
|
||||
WinInetHttpInfo_QueryOption,
|
||||
WinInetHttpInfo_QueryInfo
|
||||
};
|
||||
|
||||
#define SERVPROV_THIS(iface) DEFINE_THIS(Binding, ServiceProvider, iface)
|
||||
|
||||
static HRESULT WINAPI ServiceProvider_QueryInterface(IServiceProvider *iface,
|
||||
@@ -1559,6 +1632,7 @@ static HRESULT Binding_Create(IMoniker *mon, Binding *binding_ctx, LPCWSTR url,
|
||||
ret->lpBindingVtbl = &BindingVtbl;
|
||||
ret->lpInternetProtocolSinkVtbl = &InternetProtocolSinkVtbl;
|
||||
ret->lpInternetBindInfoVtbl = &InternetBindInfoVtbl;
|
||||
ret->lpWinInetHttpInfoVtbl = &WinInetHttpInfoVtbl;
|
||||
ret->lpServiceProviderVtbl = &ServiceProviderVtbl;
|
||||
|
||||
ret->ref = 1;
|
||||
|
||||
@@ -34,6 +34,7 @@ typedef struct {
|
||||
IInternetBindInfo *bind_info;
|
||||
IInternetProtocolSink *protocol_sink;
|
||||
IServiceProvider *service_provider;
|
||||
IWinInetInfo *wininet_info;
|
||||
|
||||
LONG priority;
|
||||
|
||||
@@ -104,6 +105,8 @@ static ULONG WINAPI BindProtocol_Release(IInternetProtocol *iface)
|
||||
TRACE("(%p) ref=%d\n", This, ref);
|
||||
|
||||
if(!ref) {
|
||||
if(This->wininet_info)
|
||||
IWinInetInfo_Release(This->wininet_info);
|
||||
if(This->protocol)
|
||||
IInternetProtocol_Release(This->protocol);
|
||||
if(This->bind_info)
|
||||
@@ -120,17 +123,18 @@ static ULONG WINAPI BindProtocol_Release(IInternetProtocol *iface)
|
||||
|
||||
static HRESULT WINAPI BindProtocol_Start(IInternetProtocol *iface, LPCWSTR szUrl,
|
||||
IInternetProtocolSink *pOIProtSink, IInternetBindInfo *pOIBindInfo,
|
||||
DWORD grfPI, DWORD dwReserved)
|
||||
DWORD grfPI, HANDLE_PTR dwReserved)
|
||||
{
|
||||
BindProtocol *This = PROTOCOL_THIS(iface);
|
||||
IInternetProtocol *protocol = NULL;
|
||||
IInternetPriority *priority;
|
||||
IServiceProvider *service_provider;
|
||||
BOOL urlmon_protocol = FALSE;
|
||||
CLSID clsid = IID_NULL;
|
||||
LPOLESTR clsid_str;
|
||||
HRESULT hres;
|
||||
|
||||
TRACE("(%p)->(%s %p %p %08x %d)\n", This, debugstr_w(szUrl), pOIProtSink,
|
||||
TRACE("(%p)->(%s %p %p %08x %lx)\n", This, debugstr_w(szUrl), pOIProtSink,
|
||||
pOIBindInfo, grfPI, dwReserved);
|
||||
|
||||
if(!szUrl || !pOIProtSink || !pOIBindInfo)
|
||||
@@ -149,7 +153,7 @@ static HRESULT WINAPI BindProtocol_Start(IInternetProtocol *iface, LPCWSTR szUrl
|
||||
IClassFactory *cf;
|
||||
IUnknown *unk;
|
||||
|
||||
hres = get_protocol_handler(szUrl, &clsid, &cf);
|
||||
hres = get_protocol_handler(szUrl, &clsid, &urlmon_protocol, &cf);
|
||||
if(FAILED(hres))
|
||||
return hres;
|
||||
|
||||
@@ -178,6 +182,9 @@ static HRESULT WINAPI BindProtocol_Start(IInternetProtocol *iface, LPCWSTR szUrl
|
||||
|
||||
This->protocol = protocol;
|
||||
|
||||
if(urlmon_protocol)
|
||||
IInternetProtocol_QueryInterface(protocol, &IID_IWinInetInfo, (void**)&This->wininet_info);
|
||||
|
||||
IInternetBindInfo_AddRef(pOIBindInfo);
|
||||
This->bind_info = pOIBindInfo;
|
||||
|
||||
@@ -304,6 +311,13 @@ void set_binding_sink(IInternetProtocol *bind_protocol, IInternetProtocolSink *s
|
||||
IServiceProvider_Release(service_provider);
|
||||
}
|
||||
|
||||
IWinInetInfo *get_wininet_info(IInternetProtocol *bind_protocol)
|
||||
{
|
||||
BindProtocol *This = PROTOCOL_THIS(bind_protocol);
|
||||
|
||||
return This->wininet_info;
|
||||
}
|
||||
|
||||
#undef PROTOCOL_THIS
|
||||
|
||||
static const IInternetProtocolVtbl BindProtocolVtbl = {
|
||||
|
||||
@@ -92,7 +92,7 @@ static ULONG WINAPI FileProtocol_Release(IInternetProtocol *iface)
|
||||
|
||||
static HRESULT WINAPI FileProtocol_Start(IInternetProtocol *iface, LPCWSTR szUrl,
|
||||
IInternetProtocolSink *pOIProtSink, IInternetBindInfo *pOIBindInfo,
|
||||
DWORD grfPI, DWORD dwReserved)
|
||||
DWORD grfPI, HANDLE_PTR dwReserved)
|
||||
{
|
||||
FileProtocol *This = PROTOCOL_THIS(iface);
|
||||
BINDINFO bindinfo;
|
||||
@@ -106,7 +106,7 @@ static HRESULT WINAPI FileProtocol_Start(IInternetProtocol *iface, LPCWSTR szUrl
|
||||
|
||||
static const WCHAR wszFile[] = {'f','i','l','e',':'};
|
||||
|
||||
TRACE("(%p)->(%s %p %p %08x %d)\n", This, debugstr_w(szUrl), pOIProtSink,
|
||||
TRACE("(%p)->(%s %p %p %08x %lx)\n", This, debugstr_w(szUrl), pOIProtSink,
|
||||
pOIBindInfo, grfPI, dwReserved);
|
||||
|
||||
if(!szUrl || strlenW(szUrl) < sizeof(wszFile)/sizeof(WCHAR)
|
||||
|
||||
@@ -35,11 +35,13 @@ typedef struct {
|
||||
|
||||
static IEnumFORMATETC *EnumFORMATETC_Create(UINT cfmtetc, const FORMATETC *rgfmtetc, UINT it);
|
||||
|
||||
#define ENUMF_THIS(iface) ICOM_THIS_MULTI(EnumFORMATETC, lpEnumFORMATETCVtbl, iface)
|
||||
#define ENUMF_THIS(iface) DEFINE_THIS(EnumFORMATETC, EnumFORMATETC, iface)
|
||||
|
||||
static HRESULT WINAPI EnumFORMATETC_QueryInterface(IEnumFORMATETC *iface, REFIID riid, void **ppv)
|
||||
{
|
||||
TRACE("(%p)->(%s %p)\n", iface, debugstr_guid(riid), ppv);
|
||||
EnumFORMATETC *This = ENUMF_THIS(iface);
|
||||
|
||||
TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppv);
|
||||
|
||||
*ppv = NULL;
|
||||
|
||||
@@ -55,7 +57,7 @@ static HRESULT WINAPI EnumFORMATETC_QueryInterface(IEnumFORMATETC *iface, REFIID
|
||||
|
||||
static ULONG WINAPI EnumFORMATETC_AddRef(IEnumFORMATETC *iface)
|
||||
{
|
||||
ENUMF_THIS(iface);
|
||||
EnumFORMATETC *This = ENUMF_THIS(iface);
|
||||
LONG ref = InterlockedIncrement(&This->ref);
|
||||
TRACE("(%p) ref=%d\n", This, ref);
|
||||
return ref;
|
||||
@@ -63,7 +65,7 @@ static ULONG WINAPI EnumFORMATETC_AddRef(IEnumFORMATETC *iface)
|
||||
|
||||
static ULONG WINAPI EnumFORMATETC_Release(IEnumFORMATETC *iface)
|
||||
{
|
||||
ENUMF_THIS(iface);
|
||||
EnumFORMATETC *This = ENUMF_THIS(iface);
|
||||
LONG ref = InterlockedDecrement(&This->ref);
|
||||
|
||||
TRACE("(%p) ref=%d\n", This, ref);
|
||||
@@ -81,7 +83,7 @@ static ULONG WINAPI EnumFORMATETC_Release(IEnumFORMATETC *iface)
|
||||
static HRESULT WINAPI EnumFORMATETC_Next(IEnumFORMATETC *iface, ULONG celt,
|
||||
FORMATETC *rgelt, ULONG *pceltFetched)
|
||||
{
|
||||
ENUMF_THIS(iface);
|
||||
EnumFORMATETC *This = ENUMF_THIS(iface);
|
||||
ULONG cnt;
|
||||
|
||||
TRACE("(%p)->(%d %p %p)\n", This, celt, rgelt, pceltFetched);
|
||||
@@ -108,7 +110,7 @@ static HRESULT WINAPI EnumFORMATETC_Next(IEnumFORMATETC *iface, ULONG celt,
|
||||
|
||||
static HRESULT WINAPI EnumFORMATETC_Skip(IEnumFORMATETC *iface, ULONG celt)
|
||||
{
|
||||
ENUMF_THIS(iface);
|
||||
EnumFORMATETC *This = ENUMF_THIS(iface);
|
||||
|
||||
TRACE("(%p)->(%d)\n", This, celt);
|
||||
|
||||
@@ -118,7 +120,7 @@ static HRESULT WINAPI EnumFORMATETC_Skip(IEnumFORMATETC *iface, ULONG celt)
|
||||
|
||||
static HRESULT WINAPI EnumFORMATETC_Reset(IEnumFORMATETC *iface)
|
||||
{
|
||||
ENUMF_THIS(iface);
|
||||
EnumFORMATETC *This = ENUMF_THIS(iface);
|
||||
|
||||
TRACE("(%p)\n", This);
|
||||
|
||||
@@ -128,7 +130,7 @@ static HRESULT WINAPI EnumFORMATETC_Reset(IEnumFORMATETC *iface)
|
||||
|
||||
static HRESULT WINAPI EnumFORMATETC_Clone(IEnumFORMATETC *iface, IEnumFORMATETC **ppenum)
|
||||
{
|
||||
ENUMF_THIS(iface);
|
||||
EnumFORMATETC *This = ENUMF_THIS(iface);
|
||||
|
||||
TRACE("(%p)->(%p)\n", This, ppenum);
|
||||
|
||||
|
||||
@@ -26,12 +26,14 @@ typedef struct {
|
||||
|
||||
const IInternetProtocolVtbl *lpInternetProtocolVtbl;
|
||||
const IInternetPriorityVtbl *lpInternetPriorityVtbl;
|
||||
const IWinInetHttpInfoVtbl *lpWinInetHttpInfoVtbl;
|
||||
|
||||
LONG ref;
|
||||
} FtpProtocol;
|
||||
|
||||
#define PROTOCOL(x) ((IInternetProtocol*) &(x)->lpInternetProtocolVtbl)
|
||||
#define PRIORITY(x) ((IInternetPriority*) &(x)->lpInternetPriorityVtbl)
|
||||
#define PROTOCOL(x) ((IInternetProtocol*) &(x)->lpInternetProtocolVtbl)
|
||||
#define PRIORITY(x) ((IInternetPriority*) &(x)->lpInternetPriorityVtbl)
|
||||
#define INETHTTPINFO(x) ((IWinInetHttpInfo*) &(x)->lpWinInetHttpInfoVtbl)
|
||||
|
||||
#define ASYNCPROTOCOL_THIS(iface) DEFINE_THIS2(FtpProtocol, base, iface)
|
||||
|
||||
@@ -97,6 +99,12 @@ static HRESULT WINAPI FtpProtocol_QueryInterface(IInternetProtocol *iface, REFII
|
||||
}else if(IsEqualGUID(&IID_IInternetPriority, riid)) {
|
||||
TRACE("(%p)->(IID_IInternetPriority %p)\n", This, ppv);
|
||||
*ppv = PRIORITY(This);
|
||||
}else if(IsEqualGUID(&IID_IWinInetInfo, riid)) {
|
||||
TRACE("(%p)->(IID_IWinInetInfo %p)\n", This, ppv);
|
||||
*ppv = INETHTTPINFO(This);
|
||||
}else if(IsEqualGUID(&IID_IWinInetHttpInfo, riid)) {
|
||||
TRACE("(%p)->(IID_IWinInetHttpInfo %p)\n", This, ppv);
|
||||
*ppv = INETHTTPINFO(This);
|
||||
}
|
||||
|
||||
if(*ppv) {
|
||||
@@ -135,13 +143,13 @@ static ULONG WINAPI FtpProtocol_Release(IInternetProtocol *iface)
|
||||
|
||||
static HRESULT WINAPI FtpProtocol_Start(IInternetProtocol *iface, LPCWSTR szUrl,
|
||||
IInternetProtocolSink *pOIProtSink, IInternetBindInfo *pOIBindInfo,
|
||||
DWORD grfPI, DWORD dwReserved)
|
||||
DWORD grfPI, HANDLE_PTR dwReserved)
|
||||
{
|
||||
FtpProtocol *This = PROTOCOL_THIS(iface);
|
||||
|
||||
static const WCHAR ftpW[] = {'f','t','p',':'};
|
||||
|
||||
TRACE("(%p)->(%s %p %p %08x %d)\n", This, debugstr_w(szUrl), pOIProtSink,
|
||||
TRACE("(%p)->(%s %p %p %08x %lx)\n", This, debugstr_w(szUrl), pOIProtSink,
|
||||
pOIBindInfo, grfPI, dwReserved);
|
||||
|
||||
if(strncmpW(szUrl, ftpW, sizeof(ftpW)/sizeof(WCHAR)))
|
||||
@@ -295,6 +303,52 @@ static const IInternetPriorityVtbl FtpPriorityVtbl = {
|
||||
FtpPriority_GetPriority
|
||||
};
|
||||
|
||||
#define INETINFO_THIS(iface) DEFINE_THIS(FtpProtocol, WinInetHttpInfo, iface)
|
||||
|
||||
static HRESULT WINAPI HttpInfo_QueryInterface(IWinInetHttpInfo *iface, REFIID riid, void **ppv)
|
||||
{
|
||||
FtpProtocol *This = INETINFO_THIS(iface);
|
||||
return IBinding_QueryInterface(PROTOCOL(This), riid, ppv);
|
||||
}
|
||||
|
||||
static ULONG WINAPI HttpInfo_AddRef(IWinInetHttpInfo *iface)
|
||||
{
|
||||
FtpProtocol *This = INETINFO_THIS(iface);
|
||||
return IBinding_AddRef(PROTOCOL(This));
|
||||
}
|
||||
|
||||
static ULONG WINAPI HttpInfo_Release(IWinInetHttpInfo *iface)
|
||||
{
|
||||
FtpProtocol *This = INETINFO_THIS(iface);
|
||||
return IBinding_Release(PROTOCOL(This));
|
||||
}
|
||||
|
||||
static HRESULT WINAPI HttpInfo_QueryOption(IWinInetHttpInfo *iface, DWORD dwOption,
|
||||
void *pBuffer, DWORD *pcbBuffer)
|
||||
{
|
||||
FtpProtocol *This = INETINFO_THIS(iface);
|
||||
FIXME("(%p)->(%x %p %p)\n", This, dwOption, pBuffer, pcbBuffer);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI HttpInfo_QueryInfo(IWinInetHttpInfo *iface, DWORD dwOption,
|
||||
void *pBuffer, DWORD *pcbBuffer, DWORD *pdwFlags, DWORD *pdwReserved)
|
||||
{
|
||||
FtpProtocol *This = INETINFO_THIS(iface);
|
||||
FIXME("(%p)->(%x %p %p %p %p)\n", This, dwOption, pBuffer, pcbBuffer, pdwFlags, pdwReserved);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
#undef INETINFO_THIS
|
||||
|
||||
static const IWinInetHttpInfoVtbl WinInetHttpInfoVtbl = {
|
||||
HttpInfo_QueryInterface,
|
||||
HttpInfo_AddRef,
|
||||
HttpInfo_Release,
|
||||
HttpInfo_QueryOption,
|
||||
HttpInfo_QueryInfo
|
||||
};
|
||||
|
||||
HRESULT FtpProtocol_Construct(IUnknown *pUnkOuter, LPVOID *ppobj)
|
||||
{
|
||||
FtpProtocol *ret;
|
||||
@@ -308,6 +362,7 @@ HRESULT FtpProtocol_Construct(IUnknown *pUnkOuter, LPVOID *ppobj)
|
||||
ret->base.vtbl = &AsyncProtocolVtbl;
|
||||
ret->lpInternetProtocolVtbl = &FtpProtocolVtbl;
|
||||
ret->lpInternetPriorityVtbl = &FtpPriorityVtbl;
|
||||
ret->lpWinInetHttpInfoVtbl = &WinInetHttpInfoVtbl;
|
||||
ret->ref = 1;
|
||||
|
||||
*ppobj = PROTOCOL(ret);
|
||||
|
||||
@@ -123,11 +123,11 @@ static ULONG WINAPI GopherProtocol_Release(IInternetProtocol *iface)
|
||||
|
||||
static HRESULT WINAPI GopherProtocol_Start(IInternetProtocol *iface, LPCWSTR szUrl,
|
||||
IInternetProtocolSink *pOIProtSink, IInternetBindInfo *pOIBindInfo,
|
||||
DWORD grfPI, DWORD dwReserved)
|
||||
DWORD grfPI, HANDLE_PTR dwReserved)
|
||||
{
|
||||
GopherProtocol *This = PROTOCOL_THIS(iface);
|
||||
|
||||
TRACE("(%p)->(%s %p %p %08x %d)\n", This, debugstr_w(szUrl), pOIProtSink,
|
||||
TRACE("(%p)->(%s %p %p %08x %lx)\n", This, debugstr_w(szUrl), pOIProtSink,
|
||||
pOIBindInfo, grfPI, dwReserved);
|
||||
|
||||
return protocol_start(&This->base, PROTOCOL(This), szUrl, pOIProtSink, pOIBindInfo);
|
||||
|
||||
@@ -34,6 +34,7 @@ typedef struct {
|
||||
|
||||
const IInternetProtocolVtbl *lpInternetProtocolVtbl;
|
||||
const IInternetPriorityVtbl *lpInternetPriorityVtbl;
|
||||
const IWinInetHttpInfoVtbl *lpWinInetHttpInfoVtbl;
|
||||
|
||||
BOOL https;
|
||||
IHttpNegotiate *http_negotiate;
|
||||
@@ -42,8 +43,9 @@ typedef struct {
|
||||
LONG ref;
|
||||
} HttpProtocol;
|
||||
|
||||
#define PROTOCOL(x) ((IInternetProtocol*) &(x)->lpInternetProtocolVtbl)
|
||||
#define PRIORITY(x) ((IInternetPriority*) &(x)->lpInternetPriorityVtbl)
|
||||
#define PROTOCOL(x) ((IInternetProtocol*) &(x)->lpInternetProtocolVtbl)
|
||||
#define PRIORITY(x) ((IInternetPriority*) &(x)->lpInternetPriorityVtbl)
|
||||
#define INETHTTPINFO(x) ((IWinInetHttpInfo*) &(x)->lpWinInetHttpInfoVtbl)
|
||||
|
||||
/* Default headers from native */
|
||||
static const WCHAR wszHeaders[] = {'A','c','c','e','p','t','-','E','n','c','o','d','i','n','g',
|
||||
@@ -326,6 +328,12 @@ static HRESULT WINAPI HttpProtocol_QueryInterface(IInternetProtocol *iface, REFI
|
||||
}else if(IsEqualGUID(&IID_IInternetPriority, riid)) {
|
||||
TRACE("(%p)->(IID_IInternetPriority %p)\n", This, ppv);
|
||||
*ppv = PRIORITY(This);
|
||||
}else if(IsEqualGUID(&IID_IWinInetInfo, riid)) {
|
||||
TRACE("(%p)->(IID_IWinInetInfo %p)\n", This, ppv);
|
||||
*ppv = INETHTTPINFO(This);
|
||||
}else if(IsEqualGUID(&IID_IWinInetHttpInfo, riid)) {
|
||||
TRACE("(%p)->(IID_IWinInetHttpInfo %p)\n", This, ppv);
|
||||
*ppv = INETHTTPINFO(This);
|
||||
}
|
||||
|
||||
if(*ppv) {
|
||||
@@ -364,14 +372,14 @@ static ULONG WINAPI HttpProtocol_Release(IInternetProtocol *iface)
|
||||
|
||||
static HRESULT WINAPI HttpProtocol_Start(IInternetProtocol *iface, LPCWSTR szUrl,
|
||||
IInternetProtocolSink *pOIProtSink, IInternetBindInfo *pOIBindInfo,
|
||||
DWORD grfPI, DWORD dwReserved)
|
||||
DWORD grfPI, HANDLE_PTR dwReserved)
|
||||
{
|
||||
HttpProtocol *This = PROTOCOL_THIS(iface);
|
||||
|
||||
static const WCHAR httpW[] = {'h','t','t','p',':'};
|
||||
static const WCHAR httpsW[] = {'h','t','t','p','s',':'};
|
||||
|
||||
TRACE("(%p)->(%s %p %p %08x %d)\n", This, debugstr_w(szUrl), pOIProtSink,
|
||||
TRACE("(%p)->(%s %p %p %08x %lx)\n", This, debugstr_w(szUrl), pOIProtSink,
|
||||
pOIBindInfo, grfPI, dwReserved);
|
||||
|
||||
if(This->https
|
||||
@@ -527,6 +535,52 @@ static const IInternetPriorityVtbl HttpPriorityVtbl = {
|
||||
HttpPriority_GetPriority
|
||||
};
|
||||
|
||||
#define INETINFO_THIS(iface) DEFINE_THIS(HttpProtocol, WinInetHttpInfo, iface)
|
||||
|
||||
static HRESULT WINAPI HttpInfo_QueryInterface(IWinInetHttpInfo *iface, REFIID riid, void **ppv)
|
||||
{
|
||||
HttpProtocol *This = INETINFO_THIS(iface);
|
||||
return IBinding_QueryInterface(PROTOCOL(This), riid, ppv);
|
||||
}
|
||||
|
||||
static ULONG WINAPI HttpInfo_AddRef(IWinInetHttpInfo *iface)
|
||||
{
|
||||
HttpProtocol *This = INETINFO_THIS(iface);
|
||||
return IBinding_AddRef(PROTOCOL(This));
|
||||
}
|
||||
|
||||
static ULONG WINAPI HttpInfo_Release(IWinInetHttpInfo *iface)
|
||||
{
|
||||
HttpProtocol *This = INETINFO_THIS(iface);
|
||||
return IBinding_Release(PROTOCOL(This));
|
||||
}
|
||||
|
||||
static HRESULT WINAPI HttpInfo_QueryOption(IWinInetHttpInfo *iface, DWORD dwOption,
|
||||
void *pBuffer, DWORD *pcbBuffer)
|
||||
{
|
||||
HttpProtocol *This = INETINFO_THIS(iface);
|
||||
FIXME("(%p)->(%x %p %p)\n", This, dwOption, pBuffer, pcbBuffer);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI HttpInfo_QueryInfo(IWinInetHttpInfo *iface, DWORD dwOption,
|
||||
void *pBuffer, DWORD *pcbBuffer, DWORD *pdwFlags, DWORD *pdwReserved)
|
||||
{
|
||||
HttpProtocol *This = INETINFO_THIS(iface);
|
||||
FIXME("(%p)->(%x %p %p %p %p)\n", This, dwOption, pBuffer, pcbBuffer, pdwFlags, pdwReserved);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
#undef INETINFO_THIS
|
||||
|
||||
static const IWinInetHttpInfoVtbl WinInetHttpInfoVtbl = {
|
||||
HttpInfo_QueryInterface,
|
||||
HttpInfo_AddRef,
|
||||
HttpInfo_Release,
|
||||
HttpInfo_QueryOption,
|
||||
HttpInfo_QueryInfo
|
||||
};
|
||||
|
||||
static HRESULT create_http_protocol(BOOL https, void **ppobj)
|
||||
{
|
||||
HttpProtocol *ret;
|
||||
@@ -538,6 +592,7 @@ static HRESULT create_http_protocol(BOOL https, void **ppobj)
|
||||
ret->base.vtbl = &AsyncProtocolVtbl;
|
||||
ret->lpInternetProtocolVtbl = &HttpProtocolVtbl;
|
||||
ret->lpInternetPriorityVtbl = &HttpPriorityVtbl;
|
||||
ret->lpWinInetHttpInfoVtbl = &WinInetHttpInfoVtbl;
|
||||
|
||||
ret->https = https;
|
||||
ret->ref = 1;
|
||||
|
||||
@@ -0,0 +1,263 @@
|
||||
/*
|
||||
* Copyright 2009 Jacek Caban for CodeWeavers
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include "urlmon_main.h"
|
||||
#include "wine/debug.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(urlmon);
|
||||
|
||||
typedef struct {
|
||||
const IInternetProtocolVtbl *lpIInternetProtocolVtbl;
|
||||
const IInternetProtocolSinkVtbl *lpIInternetProtocolSinkVtbl;
|
||||
|
||||
LONG ref;
|
||||
} MimeFilter;
|
||||
|
||||
#define PROTOCOL(x) ((IInternetProtocol*) &(x)->lpIInternetProtocolVtbl)
|
||||
#define PROTOCOLSINK(x) ((IInternetProtocolSink*) &(x)->lpIInternetProtocolSinkVtbl)
|
||||
|
||||
#define PROTOCOL_THIS(iface) DEFINE_THIS(MimeFilter, IInternetProtocol, iface)
|
||||
|
||||
static HRESULT WINAPI MimeFilterProtocol_QueryInterface(IInternetProtocol *iface, REFIID riid, void **ppv)
|
||||
{
|
||||
MimeFilter *This = PROTOCOL_THIS(iface);
|
||||
|
||||
*ppv = NULL;
|
||||
if(IsEqualGUID(&IID_IUnknown, riid)) {
|
||||
TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv);
|
||||
*ppv = PROTOCOL(This);
|
||||
}else if(IsEqualGUID(&IID_IInternetProtocolRoot, riid)) {
|
||||
TRACE("(%p)->(IID_IInternetProtocolRoot %p)\n", This, ppv);
|
||||
*ppv = PROTOCOL(This);
|
||||
}else if(IsEqualGUID(&IID_IInternetProtocol, riid)) {
|
||||
TRACE("(%p)->(IID_IInternetProtocol %p)\n", This, ppv);
|
||||
*ppv = PROTOCOL(This);
|
||||
}else if(IsEqualGUID(&IID_IInternetProtocolSink, riid)) {
|
||||
TRACE("(%p)->(IID_IInternetProtocolSink %p)\n", This, ppv);
|
||||
*ppv = PROTOCOLSINK(This);
|
||||
}
|
||||
|
||||
if(*ppv) {
|
||||
IInternetProtocol_AddRef(iface);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
WARN("not supported interface %s\n", debugstr_guid(riid));
|
||||
return E_NOINTERFACE;
|
||||
}
|
||||
|
||||
static ULONG WINAPI MimeFilterProtocol_AddRef(IInternetProtocol *iface)
|
||||
{
|
||||
MimeFilter *This = PROTOCOL_THIS(iface);
|
||||
LONG ref = InterlockedIncrement(&This->ref);
|
||||
TRACE("(%p) ref=%d\n", This, ref);
|
||||
return ref;
|
||||
}
|
||||
|
||||
static ULONG WINAPI MimeFilterProtocol_Release(IInternetProtocol *iface)
|
||||
{
|
||||
MimeFilter *This = PROTOCOL_THIS(iface);
|
||||
LONG ref = InterlockedDecrement(&This->ref);
|
||||
|
||||
TRACE("(%p) ref=%d\n", This, ref);
|
||||
|
||||
if(!ref) {
|
||||
heap_free(This);
|
||||
|
||||
URLMON_UnlockModule();
|
||||
}
|
||||
|
||||
return ref;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI MimeFilterProtocol_Start(IInternetProtocol *iface, LPCWSTR szUrl,
|
||||
IInternetProtocolSink *pOIProtSink, IInternetBindInfo *pOIBindInfo,
|
||||
DWORD grfPI, HANDLE_PTR dwReserved)
|
||||
{
|
||||
MimeFilter *This = PROTOCOL_THIS(iface);
|
||||
FIXME("(%p)->(%s %p %p %08x %lx)\n", This, debugstr_w(szUrl), pOIProtSink,
|
||||
pOIBindInfo, grfPI, dwReserved);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI MimeFilterProtocol_Continue(IInternetProtocol *iface, PROTOCOLDATA *pProtocolData)
|
||||
{
|
||||
MimeFilter *This = PROTOCOL_THIS(iface);
|
||||
FIXME("(%p)->(%p)\n", This, pProtocolData);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI MimeFilterProtocol_Abort(IInternetProtocol *iface, HRESULT hrReason,
|
||||
DWORD dwOptions)
|
||||
{
|
||||
MimeFilter *This = PROTOCOL_THIS(iface);
|
||||
FIXME("(%p)->(%08x %08x)\n", This, hrReason, dwOptions);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI MimeFilterProtocol_Terminate(IInternetProtocol *iface, DWORD dwOptions)
|
||||
{
|
||||
MimeFilter *This = PROTOCOL_THIS(iface);
|
||||
FIXME("(%p)->(%08x)\n", This, dwOptions);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI MimeFilterProtocol_Suspend(IInternetProtocol *iface)
|
||||
{
|
||||
MimeFilter *This = PROTOCOL_THIS(iface);
|
||||
FIXME("(%p)\n", This);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI MimeFilterProtocol_Resume(IInternetProtocol *iface)
|
||||
{
|
||||
MimeFilter *This = PROTOCOL_THIS(iface);
|
||||
FIXME("(%p)\n", This);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI MimeFilterProtocol_Read(IInternetProtocol *iface, void *pv,
|
||||
ULONG cb, ULONG *pcbRead)
|
||||
{
|
||||
MimeFilter *This = PROTOCOL_THIS(iface);
|
||||
FIXME("(%p)->(%p %u %p)\n", This, pv, cb, pcbRead);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI MimeFilterProtocol_Seek(IInternetProtocol *iface, LARGE_INTEGER dlibMove,
|
||||
DWORD dwOrigin, ULARGE_INTEGER *plibNewPosition)
|
||||
{
|
||||
MimeFilter *This = PROTOCOL_THIS(iface);
|
||||
FIXME("(%p)->(%d %d %p)\n", This, dlibMove.u.LowPart, dwOrigin, plibNewPosition);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI MimeFilterProtocol_LockRequest(IInternetProtocol *iface, DWORD dwOptions)
|
||||
{
|
||||
MimeFilter *This = PROTOCOL_THIS(iface);
|
||||
FIXME("(%p)->(%08x)\n", This, dwOptions);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI MimeFilterProtocol_UnlockRequest(IInternetProtocol *iface)
|
||||
{
|
||||
MimeFilter *This = PROTOCOL_THIS(iface);
|
||||
FIXME("(%p)\n", This);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
#undef PROTOCOL_THIS
|
||||
|
||||
static const IInternetProtocolVtbl MimeFilterProtocolVtbl = {
|
||||
MimeFilterProtocol_QueryInterface,
|
||||
MimeFilterProtocol_AddRef,
|
||||
MimeFilterProtocol_Release,
|
||||
MimeFilterProtocol_Start,
|
||||
MimeFilterProtocol_Continue,
|
||||
MimeFilterProtocol_Abort,
|
||||
MimeFilterProtocol_Terminate,
|
||||
MimeFilterProtocol_Suspend,
|
||||
MimeFilterProtocol_Resume,
|
||||
MimeFilterProtocol_Read,
|
||||
MimeFilterProtocol_Seek,
|
||||
MimeFilterProtocol_LockRequest,
|
||||
MimeFilterProtocol_UnlockRequest
|
||||
};
|
||||
|
||||
#define PROTSINK_THIS(iface) DEFINE_THIS(MimeFilter, IInternetProtocolSink, iface)
|
||||
|
||||
static HRESULT WINAPI MimeFilterSink_QueryInterface(IInternetProtocolSink *iface,
|
||||
REFIID riid, void **ppv)
|
||||
{
|
||||
MimeFilter *This = PROTSINK_THIS(iface);
|
||||
return IInternetProtocol_QueryInterface(PROTOCOL(This), riid, ppv);
|
||||
}
|
||||
|
||||
static ULONG WINAPI MimeFilterSink_AddRef(IInternetProtocolSink *iface)
|
||||
{
|
||||
MimeFilter *This = PROTSINK_THIS(iface);
|
||||
return IInternetProtocol_AddRef(PROTOCOL(This));
|
||||
}
|
||||
|
||||
static ULONG WINAPI MimeFilterSink_Release(IInternetProtocolSink *iface)
|
||||
{
|
||||
MimeFilter *This = PROTSINK_THIS(iface);
|
||||
return IInternetProtocol_Release(PROTOCOL(This));
|
||||
}
|
||||
|
||||
static HRESULT WINAPI MimeFilterSink_Switch(IInternetProtocolSink *iface,
|
||||
PROTOCOLDATA *pProtocolData)
|
||||
{
|
||||
MimeFilter *This = PROTSINK_THIS(iface);
|
||||
FIXME("(%p)->(%p)\n", This, pProtocolData);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI MimeFilterSink_ReportProgress(IInternetProtocolSink *iface,
|
||||
ULONG ulStatusCode, LPCWSTR szStatusText)
|
||||
{
|
||||
MimeFilter *This = PROTSINK_THIS(iface);
|
||||
FIXME("(%p)->(%u %s)\n", This, ulStatusCode, debugstr_w(szStatusText));
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI MimeFilterSink_ReportData(IInternetProtocolSink *iface,
|
||||
DWORD grfBSCF, ULONG ulProgress, ULONG ulProgressMax)
|
||||
{
|
||||
MimeFilter *This = PROTSINK_THIS(iface);
|
||||
FIXME("(%p)->(%d %u %u)\n", This, grfBSCF, ulProgress, ulProgressMax);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI MimeFilterSink_ReportResult(IInternetProtocolSink *iface,
|
||||
HRESULT hrResult, DWORD dwError, LPCWSTR szResult)
|
||||
{
|
||||
MimeFilter *This = PROTSINK_THIS(iface);
|
||||
FIXME("(%p)->(%08x %d %s)\n", This, hrResult, dwError, debugstr_w(szResult));
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
#undef PROTSINK_THIS
|
||||
|
||||
static const IInternetProtocolSinkVtbl InternetProtocolSinkVtbl = {
|
||||
MimeFilterSink_QueryInterface,
|
||||
MimeFilterSink_AddRef,
|
||||
MimeFilterSink_Release,
|
||||
MimeFilterSink_Switch,
|
||||
MimeFilterSink_ReportProgress,
|
||||
MimeFilterSink_ReportData,
|
||||
MimeFilterSink_ReportResult
|
||||
};
|
||||
|
||||
HRESULT MimeFilter_Construct(IUnknown *pUnkOuter, LPVOID *ppobj)
|
||||
{
|
||||
MimeFilter *ret;
|
||||
|
||||
TRACE("(%p %p)\n", pUnkOuter, ppobj);
|
||||
|
||||
URLMON_LockModule();
|
||||
|
||||
ret = heap_alloc_zero(sizeof(MimeFilter));
|
||||
|
||||
ret->lpIInternetProtocolVtbl = &MimeFilterProtocolVtbl;
|
||||
ret->lpIInternetProtocolSinkVtbl = &InternetProtocolSinkVtbl;
|
||||
ret->ref = 1;
|
||||
|
||||
*ppobj = PROTOCOL(ret);
|
||||
return S_OK;
|
||||
}
|
||||
@@ -93,7 +93,7 @@ static HRESULT report_result(IInternetProtocolSink *sink, HRESULT hres, DWORD dw
|
||||
|
||||
static HRESULT WINAPI MkProtocol_Start(IInternetProtocol *iface, LPCWSTR szUrl,
|
||||
IInternetProtocolSink *pOIProtSink, IInternetBindInfo *pOIBindInfo,
|
||||
DWORD grfPI, DWORD dwReserved)
|
||||
DWORD grfPI, HANDLE_PTR dwReserved)
|
||||
{
|
||||
MkProtocol *This = PROTOCOL_THIS(iface);
|
||||
IParseDisplayName *pdn;
|
||||
@@ -108,7 +108,7 @@ static HRESULT WINAPI MkProtocol_Start(IInternetProtocol *iface, LPCWSTR szUrl,
|
||||
|
||||
static const WCHAR wszMK[] = {'m','k',':','@'};
|
||||
|
||||
TRACE("(%p)->(%s %p %p %08x %d)\n", This, debugstr_w(szUrl), pOIProtSink,
|
||||
TRACE("(%p)->(%s %p %p %08x %lx)\n", This, debugstr_w(szUrl), pOIProtSink,
|
||||
pOIBindInfo, grfPI, dwReserved);
|
||||
|
||||
if(strncmpiW(szUrl, wszMK, sizeof(wszMK)/sizeof(WCHAR)))
|
||||
|
||||
@@ -513,10 +513,10 @@ static struct regsvr_interface const interface_list[] = {
|
||||
#define INF_SET_CLSID(clsid) \
|
||||
do \
|
||||
{ \
|
||||
static CHAR name[] = "CLSID_" #clsid; \
|
||||
static CHAR name[] = #clsid; \
|
||||
\
|
||||
pse[i].pszName = name; \
|
||||
clsids[i++] = &CLSID_ ## clsid; \
|
||||
clsids[i++] = &clsid; \
|
||||
} while (0)
|
||||
|
||||
static HRESULT register_inf(BOOL doregister)
|
||||
@@ -525,19 +525,20 @@ static HRESULT register_inf(BOOL doregister)
|
||||
HMODULE hAdvpack;
|
||||
HRESULT (WINAPI *pRegInstall)(HMODULE hm, LPCSTR pszSection, const STRTABLEA* pstTable);
|
||||
STRTABLEA strtable;
|
||||
STRENTRYA pse[7];
|
||||
static CLSID const *clsids[34];
|
||||
STRENTRYA pse[8];
|
||||
static CLSID const *clsids[8];
|
||||
unsigned int i = 0;
|
||||
|
||||
static const WCHAR wszAdvpack[] = {'a','d','v','p','a','c','k','.','d','l','l',0};
|
||||
|
||||
INF_SET_CLSID(CdlProtocol);
|
||||
INF_SET_CLSID(FileProtocol);
|
||||
INF_SET_CLSID(FtpProtocol);
|
||||
INF_SET_CLSID(GopherProtocol);
|
||||
INF_SET_CLSID(HttpProtocol);
|
||||
INF_SET_CLSID(HttpSProtocol);
|
||||
INF_SET_CLSID(MkProtocol);
|
||||
INF_SET_CLSID(CLSID_CdlProtocol);
|
||||
INF_SET_CLSID(CLSID_FileProtocol);
|
||||
INF_SET_CLSID(CLSID_FtpProtocol);
|
||||
INF_SET_CLSID(CLSID_GopherProtocol);
|
||||
INF_SET_CLSID(CLSID_HttpProtocol);
|
||||
INF_SET_CLSID(CLSID_HttpSProtocol);
|
||||
INF_SET_CLSID(CLSID_MkProtocol);
|
||||
INF_SET_CLSID(CLSID_DeCompMimeFilter);
|
||||
|
||||
for(i = 0; i < sizeof(pse)/sizeof(pse[0]); i++) {
|
||||
pse[i].pszValue = heap_alloc(39);
|
||||
|
||||
@@ -228,7 +228,7 @@ IInternetProtocolInfo *get_protocol_info(LPCWSTR url)
|
||||
return ret;
|
||||
}
|
||||
|
||||
HRESULT get_protocol_handler(LPCWSTR url, CLSID *clsid, IClassFactory **ret)
|
||||
HRESULT get_protocol_handler(LPCWSTR url, CLSID *clsid, BOOL *urlmon_protocol, IClassFactory **ret)
|
||||
{
|
||||
name_space *ns;
|
||||
WCHAR schema[64];
|
||||
@@ -250,6 +250,8 @@ HRESULT get_protocol_handler(LPCWSTR url, CLSID *clsid, IClassFactory **ret)
|
||||
IClassFactory_AddRef(*ret);
|
||||
if(clsid)
|
||||
*clsid = ns->clsid;
|
||||
if(urlmon_protocol)
|
||||
*urlmon_protocol = ns->urlmon;
|
||||
}
|
||||
|
||||
LeaveCriticalSection(&session_cs);
|
||||
@@ -257,6 +259,8 @@ HRESULT get_protocol_handler(LPCWSTR url, CLSID *clsid, IClassFactory **ret)
|
||||
if(*ret)
|
||||
return S_OK;
|
||||
|
||||
if(urlmon_protocol)
|
||||
*urlmon_protocol = FALSE;
|
||||
return get_protocol_cf(schema, schema_len, clsid, ret);
|
||||
}
|
||||
|
||||
|
||||
@@ -20,13 +20,9 @@
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include "urlmon_main.h"
|
||||
|
||||
#include "winreg.h"
|
||||
#include "winternl.h"
|
||||
#include "wininet.h"
|
||||
#include "shlwapi.h"
|
||||
|
||||
#include "wine/debug.h"
|
||||
|
||||
@@ -3,11 +3,19 @@ Signature="$CHICAGO$"
|
||||
|
||||
|
||||
[RegisterDll]
|
||||
AddReg=Protocols.Reg, ZoneMap.Reg, Zones.Reg
|
||||
AddReg=Classes.Reg, Protocols.Reg, ZoneMap.Reg, Zones.Reg
|
||||
|
||||
|
||||
[UnregisterDll]
|
||||
DelReg=Protocols.Reg, ZoneMap.Reg, Zones.Reg
|
||||
DelReg=Classes.Reg, Protocols.Reg, ZoneMap.Reg, Zones.Reg
|
||||
|
||||
|
||||
[Classes.Reg]
|
||||
|
||||
;; CLSID_DeCompMimeFilter
|
||||
HKCR,"CLSID\%CLSID_DeCompMimeFilter%",,,"AP lzdhtml encoding/decoding Filter"
|
||||
HKCR,"CLSID\%CLSID_DeCompMimeFilter%\InProcServer32",,,"%MODULE%"
|
||||
HKCR,"CLSID\%CLSID_DeCompMimeFilter%\InProcServer32","ThreadingModel",,"Apartment"
|
||||
|
||||
|
||||
[Protocols.Reg]
|
||||
@@ -26,7 +34,12 @@ HKCR,"PROTOCOLS\Handler\http","CLSID",,"%CLSID_HttpProtocol%"
|
||||
HKCR,"PROTOCOLS\Handler\https",,,"https: Asynchronous Pluggable Protocol Handler"
|
||||
HKCR,"PROTOCOLS\Handler\https","CLSID",,"%CLSID_HttpsProtocol%"
|
||||
HKCR,"PROTOCOLS\Handler\mk",,,"mk: Asynchronous Pluggable Protocol Handler"
|
||||
HKCR,"PROTOCOLS\Handler\mk","CLSID",,"%CLSID_MkProtocol%"
|
||||
HKCR,"PROTOCOLS\Filter\deflate",,,"AP Deflate Encoding/Decoding Filter"
|
||||
HKCR,"PROTOCOLS\Filter\deflate","CLSID",,"%CLSID_DeCompMimeFilter%"
|
||||
HKCR,"PROTOCOLS\Filter\gzip",,,"AP Deflate Encoding/Decoding Filter"
|
||||
HKCR,"PROTOCOLS\Filter\gzip","CLSID",,"%CLSID_DeCompMimeFilter%"
|
||||
HKCR,"PROTOCOLS\Filter\lzdhtml",,,"AP Deflate Encoding/Decoding Filter"
|
||||
HKCR,"PROTOCOLS\Filter\lzdhtml","CLSID",,"%CLSID_DeCompMimeFilter%"
|
||||
|
||||
|
||||
[ZoneMap.Reg]
|
||||
@@ -448,6 +461,8 @@ HKLM,"%ZONES_UNTRUSTED%","1E05",0x10003,0x10000
|
||||
|
||||
|
||||
[Strings]
|
||||
MODULE="urlmon.dll"
|
||||
|
||||
PATH_ZONEMAP="Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap"
|
||||
PATH_ZONEMAP_PROTOCOLS="Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\ProtocolDefaults"
|
||||
PATH_ZONEMAP_DOMAINS="Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains"
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
<file>gopher.c</file>
|
||||
<file>http.c</file>
|
||||
<file>internet.c</file>
|
||||
<file>mimefilter.c</file>
|
||||
<file>mk.c</file>
|
||||
<file>protocol.c</file>
|
||||
<file>regsvr.c</file>
|
||||
@@ -37,4 +38,7 @@
|
||||
<library>kernel32</library>
|
||||
<library>ntdll</library>
|
||||
</module>
|
||||
<module name="urlmon_local_interface" type="idlinterface">
|
||||
<file>urlmon_local.idl</file>
|
||||
</module>
|
||||
</group>
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
|
||||
#include "urlmon.idl"
|
||||
@@ -187,6 +187,8 @@ static const ClassFactory ZoneManagerCF =
|
||||
{ &ClassFactoryVtbl, ZoneMgrImpl_Construct};
|
||||
static const ClassFactory StdURLMonikerCF =
|
||||
{ &ClassFactoryVtbl, StdURLMoniker_Construct};
|
||||
static const ClassFactory MimeFilterCF =
|
||||
{ &ClassFactoryVtbl, MimeFilter_Construct};
|
||||
|
||||
struct object_creation_info
|
||||
{
|
||||
@@ -212,7 +214,8 @@ static const struct object_creation_info object_creation[] =
|
||||
{ &CLSID_MkProtocol, CLASSFACTORY(&MkProtocolCF), wszMk },
|
||||
{ &CLSID_InternetSecurityManager, CLASSFACTORY(&SecurityManagerCF), NULL },
|
||||
{ &CLSID_InternetZoneManager, CLASSFACTORY(&ZoneManagerCF), NULL },
|
||||
{ &CLSID_StdURLMoniker, CLASSFACTORY(&StdURLMonikerCF), NULL }
|
||||
{ &CLSID_StdURLMoniker, CLASSFACTORY(&StdURLMonikerCF), NULL },
|
||||
{ &CLSID_DeCompMimeFilter, CLASSFACTORY(&MimeFilterCF), NULL }
|
||||
};
|
||||
|
||||
static void init_session(BOOL init)
|
||||
|
||||
@@ -45,6 +45,7 @@ extern HRESULT HttpSProtocol_Construct(IUnknown *pUnkOuter, LPVOID *ppobj);
|
||||
extern HRESULT FtpProtocol_Construct(IUnknown *pUnkOuter, LPVOID *ppobj);
|
||||
extern HRESULT GopherProtocol_Construct(IUnknown *pUnkOuter, LPVOID *ppobj);
|
||||
extern HRESULT MkProtocol_Construct(IUnknown *pUnkOuter, LPVOID *ppobj);
|
||||
extern HRESULT MimeFilter_Construct(IUnknown *pUnkOuter, LPVOID *ppobj);
|
||||
|
||||
/**********************************************************************
|
||||
* Dll lifetime tracking declaration for urlmon.dll
|
||||
@@ -53,12 +54,11 @@ extern LONG URLMON_refCount;
|
||||
static inline void URLMON_LockModule(void) { InterlockedIncrement( &URLMON_refCount ); }
|
||||
static inline void URLMON_UnlockModule(void) { InterlockedDecrement( &URLMON_refCount ); }
|
||||
|
||||
#define ICOM_THIS_MULTI(impl,field,iface) impl* const This=(impl*)((char*)(iface) - offsetof(impl,field))
|
||||
#define DEFINE_THIS2(cls,ifc,iface) ((cls*)((BYTE*)(iface)-offsetof(cls,ifc)))
|
||||
#define DEFINE_THIS(cls,ifc,iface) DEFINE_THIS2(cls,lp ## ifc ## Vtbl,iface)
|
||||
|
||||
IInternetProtocolInfo *get_protocol_info(LPCWSTR url);
|
||||
HRESULT get_protocol_handler(LPCWSTR url, CLSID *clsid, IClassFactory **ret);
|
||||
IInternetProtocolInfo *get_protocol_info(LPCWSTR);
|
||||
HRESULT get_protocol_handler(LPCWSTR,CLSID*,BOOL*,IClassFactory**);
|
||||
BOOL is_registered_protocol(LPCWSTR);
|
||||
void register_urlmon_namespace(IClassFactory*,REFIID,LPCWSTR,BOOL);
|
||||
|
||||
@@ -67,6 +67,7 @@ HRESULT bind_to_object(IMoniker *mon, LPCWSTR url, IBindCtx *pbc, REFIID riid, v
|
||||
|
||||
HRESULT create_binding_protocol(LPCWSTR url, BOOL from_urlmon, IInternetProtocol **protocol);
|
||||
void set_binding_sink(IInternetProtocol *bind_protocol, IInternetProtocolSink *sink);
|
||||
IWinInetInfo *get_wininet_info(IInternetProtocol*);
|
||||
|
||||
typedef struct ProtocolVtbl ProtocolVtbl;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user