From: Nikolay Sivov nsivov@codeweavers.com
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/opcservices/tests/opcservices.c | 21 +++++++++++++++++++++ include/opcbase.idl | 1 + 2 files changed, 22 insertions(+)
diff --git a/dlls/opcservices/tests/opcservices.c b/dlls/opcservices/tests/opcservices.c index 3359fc9c4dc..94f977f8228 100644 --- a/dlls/opcservices/tests/opcservices.c +++ b/dlls/opcservices/tests/opcservices.c @@ -672,6 +672,13 @@ static void test_part_enumerator(void) hr = IOpcPartEnumerator_MoveNext(partenum, NULL); ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
+ ret = 123; + hr = IOpcPartEnumerator_MovePrevious(partenum, &ret); + todo_wine + ok(hr == OPC_E_ENUM_CANNOT_MOVE_PREVIOUS, "Unexpected hr %#lx.\n", hr); + todo_wine + ok(ret == 123, "Unexpected result %d.\n", ret); + ret = TRUE; hr = IOpcPartEnumerator_MoveNext(partenum, &ret); ok(hr == S_OK, "Failed to move, hr %#lx.\n", hr); @@ -687,6 +694,13 @@ static void test_part_enumerator(void) ok(hr == S_OK, "Failed to move, hr %#lx.\n", hr); ok(!ret, "Unexpected result %d.\n", ret);
+ ret = 123; + hr = IOpcPartEnumerator_MovePrevious(partenum, &ret); + todo_wine + ok(hr == OPC_E_ENUM_CANNOT_MOVE_PREVIOUS, "Unexpected hr %#lx.\n", hr); + todo_wine + ok(ret == 123, "Unexpected result %d.\n", ret); + hr = IOpcFactory_CreatePartUri(factory, L"/uri", &part_uri); ok(hr == S_OK, "Failed to create part uri, hr %#lx.\n", hr);
@@ -772,6 +786,13 @@ static void test_part_enumerator(void) hr = IOpcPartEnumerator_GetCurrent(partenum, &part2); ok(hr == OPC_E_ENUM_INVALID_POSITION, "Unexpected hr %#lx.\n", hr);
+ ret = 123; + hr = IOpcPartEnumerator_MovePrevious(partenum, &ret); + todo_wine + ok(hr == OPC_E_ENUM_CANNOT_MOVE_PREVIOUS, "Unexpected hr %#lx.\n", hr); + todo_wine + ok(ret == 123, "Unexpected result %d.\n", ret); + hr = IOpcPartEnumerator_Clone(partenum, &partenum2); ok(hr == S_OK, "Clone failed, hr %#lx.\n", hr);
diff --git a/include/opcbase.idl b/include/opcbase.idl index fcf641481e2..1d4aa253aa5 100644 --- a/include/opcbase.idl +++ b/include/opcbase.idl @@ -50,4 +50,5 @@ cpp_quote("#define OPC_E_NO_SUCH_PART MAKE_HRESULT(SEVERITY_ERROR, FACILITY_OPC, cpp_quote("#define OPC_E_NO_SUCH_RELATIONSHIP MAKE_HRESULT(SEVERITY_ERROR, FACILITY_OPC, 0x48)") cpp_quote("#define OPC_E_ENUM_COLLECTION_CHANGED MAKE_HRESULT(SEVERITY_ERROR, FACILITY_OPC, 0x50)") cpp_quote("#define OPC_E_ENUM_CANNOT_MOVE_NEXT MAKE_HRESULT(SEVERITY_ERROR, FACILITY_OPC, 0x51)") +cpp_quote("#define OPC_E_ENUM_CANNOT_MOVE_PREVIOUS MAKE_HRESULT(SEVERITY_ERROR, FACILITY_OPC, 0x52)") cpp_quote("#define OPC_E_ENUM_INVALID_POSITION MAKE_HRESULT(SEVERITY_ERROR, FACILITY_OPC, 0x53)")