opcservices: Implement PartExists().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
f663745ca5
commit
c009967bae
|
@ -1011,9 +1011,16 @@ static HRESULT WINAPI opc_part_set_DeletePart(IOpcPartSet *iface, IOpcPartUri *n
|
|||
|
||||
static HRESULT WINAPI opc_part_set_PartExists(IOpcPartSet *iface, IOpcPartUri *name, BOOL *exists)
|
||||
{
|
||||
FIXME("iface %p, name %p, exists %p stub!\n", iface, name, exists);
|
||||
struct opc_part_set *part_set = impl_from_IOpcPartSet(iface);
|
||||
|
||||
return E_NOTIMPL;
|
||||
TRACE("iface %p, name %p, exists %p.\n", iface, name, exists);
|
||||
|
||||
if (!name || !exists)
|
||||
return E_POINTER;
|
||||
|
||||
*exists = opc_part_set_get_part(part_set, name) != NULL;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI opc_part_set_GetEnumerator(IOpcPartSet *iface, IOpcPartEnumerator **enumerator)
|
||||
|
|
|
@ -187,12 +187,19 @@ static void test_package(void)
|
|||
IOpcRelationshipSet_Release(relset);
|
||||
IOpcRelationshipSet_Release(relset2);
|
||||
|
||||
ret = 123;
|
||||
hr = IOpcPartSet_PartExists(partset, NULL, &ret);
|
||||
ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr);
|
||||
ok(ret == 123, "Unexpected return value.\n");
|
||||
|
||||
hr = IOpcPartSet_PartExists(partset, part_uri, NULL);
|
||||
ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr);
|
||||
|
||||
ret = FALSE;
|
||||
hr = IOpcPartSet_PartExists(partset, part_uri, &ret);
|
||||
todo_wine {
|
||||
ok(SUCCEEDED(hr), "Unexpected hr %#x.\n", hr);
|
||||
ok(ret, "Expected part to exist.\n");
|
||||
}
|
||||
|
||||
IOpcPartUri_Release(part_uri);
|
||||
IOpcPart_Release(part);
|
||||
|
||||
|
|
Loading…
Reference in New Issue