From 57b83e1459316ff3e04809f2f8655e458a14322e Mon Sep 17 00:00:00 2001 From: Bruno Jesus <00cpxxx@gmail.com> Date: Mon, 30 Jan 2017 21:42:28 -0200 Subject: [PATCH] shlwapi/tests: Test NULL handle duplication in SHMapHandle(). Signed-off-by: Bruno Jesus <00cpxxx@gmail.com> Signed-off-by: Alexandre Julliard --- dlls/shlwapi/tests/ordinal.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/dlls/shlwapi/tests/ordinal.c b/dlls/shlwapi/tests/ordinal.c index ad3048b371e..004c75da3fe 100644 --- a/dlls/shlwapi/tests/ordinal.c +++ b/dlls/shlwapi/tests/ordinal.c @@ -568,6 +568,12 @@ static void test_alloc_shared_remote(DWORD procid, HANDLE hmem) ok(ret, "SHUnlockShared failed: %u\n", GetLastError()); /* test SHMapHandle */ + SetLastError(0xdeadbeef); + hmem2 = pSHMapHandle(NULL, procid, GetCurrentProcessId(), 0, 0); + ok(hmem2 == NULL, "expected NULL, got new handle\n"); +todo_wine + ok(GetLastError() == 0xdeadbeef, "last error should not have changed, got %u\n", GetLastError()); + hmem2 = pSHMapHandle(hmem, procid, GetCurrentProcessId(), 0, 0); /* It seems like Windows Vista/2008 uses a different internal implementation