Commit ab6adcb0 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

urlmon: Reimplement CoInternetCombineUrl to use pluggable protocol.

parent 0d57265a
......@@ -166,7 +166,9 @@ static HRESULT parse_security_domain(LPCWSTR url, DWORD flags, LPWSTR result,
return E_FAIL;
}
/**************************************************************************
* CoInternetParseUrl (URLMON.@)
*/
HRESULT WINAPI CoInternetParseUrl(LPCWSTR pwzUrl, PARSEACTION ParseAction, DWORD dwFlags,
LPWSTR pszResult, DWORD cchResult, DWORD *pcchResult, DWORD dwReserved)
{
......@@ -190,3 +192,36 @@ HRESULT WINAPI CoInternetParseUrl(LPCWSTR pwzUrl, PARSEACTION ParseAction, DWORD
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;
}
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)
{
TRACE("(%s,%s,%08lx)\n", debugstr_w(pwzUrl1), debugstr_w(pwzUrl2), dwCompareFlags);
......
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