urlmon: Reimplement CoInternetCombineUrl to use pluggable protocol.
This commit is contained in:
parent
0d57265a16
commit
ab6adcb077
|
@ -166,7 +166,9 @@ static HRESULT parse_security_domain(LPCWSTR url, DWORD flags, LPWSTR result,
|
||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**************************************************************************
|
||||||
|
* CoInternetParseUrl (URLMON.@)
|
||||||
|
*/
|
||||||
HRESULT WINAPI CoInternetParseUrl(LPCWSTR pwzUrl, PARSEACTION ParseAction, DWORD dwFlags,
|
HRESULT WINAPI CoInternetParseUrl(LPCWSTR pwzUrl, PARSEACTION ParseAction, DWORD dwFlags,
|
||||||
LPWSTR pszResult, DWORD cchResult, DWORD *pcchResult, DWORD dwReserved)
|
LPWSTR pszResult, DWORD cchResult, DWORD *pcchResult, DWORD dwReserved)
|
||||||
{
|
{
|
||||||
|
@ -190,3 +192,36 @@ HRESULT WINAPI CoInternetParseUrl(LPCWSTR pwzUrl, PARSEACTION ParseAction, DWORD
|
||||||
|
|
||||||
return E_NOTIMPL;
|
return E_NOTIMPL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**************************************************************************
|
||||||
|
* CoInternetCombineUrl (URLMON.@)
|
||||||
|
*/
|
||||||
|
HRESULT WINAPI CoInternetCombineUrl(LPCWSTR pwzBaseUrl, LPCWSTR pwzRelativeUrl,
|
||||||
|
DWORD dwCombineFlags, LPWSTR pwzResult, DWORD cchResult, DWORD *pcchResult,
|
||||||
|
DWORD dwReserved)
|
||||||
|
{
|
||||||
|
IInternetProtocolInfo *protocol_info;
|
||||||
|
DWORD size = cchResult;
|
||||||
|
HRESULT hres;
|
||||||
|
|
||||||
|
TRACE("(%s,%s,0x%08lx,%p,%ld,%p,%ld)\n", debugstr_w(pwzBaseUrl),
|
||||||
|
debugstr_w(pwzRelativeUrl), dwCombineFlags, pwzResult, cchResult, pcchResult,
|
||||||
|
dwReserved);
|
||||||
|
|
||||||
|
protocol_info = get_protocol_info(pwzBaseUrl);
|
||||||
|
|
||||||
|
if(protocol_info) {
|
||||||
|
hres = IInternetProtocolInfo_CombineUrl(protocol_info, pwzBaseUrl, pwzRelativeUrl,
|
||||||
|
dwCombineFlags, pwzResult, cchResult, pcchResult, dwReserved);
|
||||||
|
if(SUCCEEDED(hres))
|
||||||
|
return hres;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
hres = UrlCombineW(pwzBaseUrl, pwzRelativeUrl, pwzResult, &size, dwCombineFlags);
|
||||||
|
|
||||||
|
if(pcchResult)
|
||||||
|
*pcchResult = size;
|
||||||
|
|
||||||
|
return hres;
|
||||||
|
}
|
||||||
|
|
|
@ -293,19 +293,6 @@ HRESULT WINAPI ObtainUserAgentString(DWORD dwOption, LPSTR pcszUAOut, DWORD *cbS
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
HRESULT WINAPI CoInternetCombineUrl(LPCWSTR pwzBaseUrl, LPCWSTR pwzRelativeUrl, DWORD dwCombineFlags,
|
|
||||||
LPWSTR pwzResult, DWORD cchResult, DWORD *pcchResult, DWORD dwReserved)
|
|
||||||
{
|
|
||||||
HRESULT hres;
|
|
||||||
DWORD size = cchResult;
|
|
||||||
|
|
||||||
TRACE("(%s,%s,0x%08lx,%p,%ld,%p,%ld)\n", debugstr_w(pwzBaseUrl), debugstr_w(pwzRelativeUrl), dwCombineFlags,
|
|
||||||
pwzResult, cchResult, pcchResult, dwReserved);
|
|
||||||
hres = UrlCombineW(pwzBaseUrl, pwzRelativeUrl, pwzResult, &size, dwCombineFlags);
|
|
||||||
if(pcchResult) *pcchResult = size;
|
|
||||||
return hres;
|
|
||||||
}
|
|
||||||
|
|
||||||
HRESULT WINAPI CoInternetCompareUrl(LPCWSTR pwzUrl1, LPCWSTR pwzUrl2, DWORD dwCompareFlags)
|
HRESULT WINAPI CoInternetCompareUrl(LPCWSTR pwzUrl1, LPCWSTR pwzUrl2, DWORD dwCompareFlags)
|
||||||
{
|
{
|
||||||
TRACE("(%s,%s,%08lx)\n", debugstr_w(pwzUrl1), debugstr_w(pwzUrl2), dwCompareFlags);
|
TRACE("(%s,%s,%08lx)\n", debugstr_w(pwzUrl1), debugstr_w(pwzUrl2), dwCompareFlags);
|
||||||
|
|
Loading…
Reference in New Issue