Commit 2546e47b authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

opcservices: Implement CombinePartUri().

parent 960cbe80
......@@ -1053,19 +1053,25 @@ static void test_combine_uri(void)
hr = CreateUri(relativeW, Uri_CREATE_ALLOW_RELATIVE, 0, &relative_uri);
ok(SUCCEEDED(hr), "%u: failed to create relative uri, hr %#x.\n", i, hr);
combined_uri = (void *)0xdeadbeef;
hr = IOpcUri_CombinePartUri(uri, NULL, &combined_uri);
ok(hr == E_POINTER, "%u: failed to combine uris, hr %#x.\n", i, hr);
ok(!combined_uri, "Unexpected instance.\n");
hr = IOpcUri_CombinePartUri(uri, relative_uri, NULL);
ok(hr == E_POINTER, "%u: failed to combine uris, hr %#x.\n", i, hr);
hr = IOpcUri_CombinePartUri(uri, relative_uri, &combined_uri);
todo_wine
ok(SUCCEEDED(hr), "%u: failed to combine uris, hr %#x.\n", i, hr);
if (SUCCEEDED(hr))
{
hr = IOpcPartUri_GetRawUri(combined_uri, &str);
ok(SUCCEEDED(hr), "%u: failed to get raw uri, hr %#x.\n", i, hr);
todo_wine_if(i == 2 || i == 3)
ok(!lstrcmpW(str, combinedW), "%u: unexpected uri %s.\n", i, wine_dbgstr_w(str));
SysFreeString(str);
IOpcPartUri_Release(combined_uri);
}
heap_free(uriW);
heap_free(relativeW);
heap_free(combinedW);
......
......@@ -357,9 +357,26 @@ static HRESULT WINAPI opc_uri_GetRelativeUri(IOpcPartUri *iface, IOpcPartUri *pa
static HRESULT WINAPI opc_uri_CombinePartUri(IOpcPartUri *iface, IUri *relative_uri, IOpcPartUri **combined)
{
FIXME("iface %p, relative_uri %p, combined %p stub!\n", iface, relative_uri, combined);
struct opc_uri *uri = impl_from_IOpcPartUri(iface);
IUri *combined_uri;
HRESULT hr;
return E_NOTIMPL;
TRACE("iface %p, relative_uri %p, combined %p.\n", iface, relative_uri, combined);
if (!combined)
return E_POINTER;
*combined = NULL;
if (!relative_uri)
return E_POINTER;
if (FAILED(hr = CoInternetCombineIUri(uri->uri, relative_uri, 0, &combined_uri, 0)))
return hr;
hr = opc_part_uri_create(combined_uri, NULL, combined);
IUri_Release(combined_uri);
return hr;
}
static HRESULT WINAPI opc_uri_ComparePartUri(IOpcPartUri *iface, IOpcPartUri *part_uri,
......
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