shlwapi: SHMapHandle should not set error when NULL is passed as hShared.
Signed-off-by: Vijay Kiran Kamuju <infyquest@gmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
5cd7f63f72
commit
7f6e109081
|
@ -97,6 +97,12 @@ HANDLE WINAPI SHMapHandle(HANDLE hShared, DWORD dwSrcProcId, DWORD dwDstProcId,
|
||||||
TRACE("(%p,%d,%d,%08x,%08x)\n", hShared, dwDstProcId, dwSrcProcId,
|
TRACE("(%p,%d,%d,%08x,%08x)\n", hShared, dwDstProcId, dwSrcProcId,
|
||||||
dwAccess, dwOptions);
|
dwAccess, dwOptions);
|
||||||
|
|
||||||
|
if (!hShared)
|
||||||
|
{
|
||||||
|
TRACE("Returning handle NULL\n");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
/* Get dest process handle */
|
/* Get dest process handle */
|
||||||
if (dwDstProcId == dwMyProcId)
|
if (dwDstProcId == dwMyProcId)
|
||||||
hDst = GetCurrentProcess();
|
hDst = GetCurrentProcess();
|
||||||
|
|
|
@ -556,7 +556,6 @@ static void test_alloc_shared_remote(DWORD procid, HANDLE hmem)
|
||||||
SetLastError(0xdeadbeef);
|
SetLastError(0xdeadbeef);
|
||||||
hmem2 = pSHMapHandle(NULL, procid, GetCurrentProcessId(), 0, 0);
|
hmem2 = pSHMapHandle(NULL, procid, GetCurrentProcessId(), 0, 0);
|
||||||
ok(hmem2 == NULL, "expected NULL, got new handle\n");
|
ok(hmem2 == NULL, "expected NULL, got new handle\n");
|
||||||
todo_wine
|
|
||||||
ok(GetLastError() == 0xdeadbeef, "last error should not have changed, got %u\n", GetLastError());
|
ok(GetLastError() == 0xdeadbeef, "last error should not have changed, got %u\n", GetLastError());
|
||||||
|
|
||||||
hmem2 = pSHMapHandle(hmem, procid, GetCurrentProcessId(), 0, 0);
|
hmem2 = pSHMapHandle(hmem, procid, GetCurrentProcessId(), 0, 0);
|
||||||
|
|
Loading…
Reference in New Issue